aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/__tests__/paths.test.ts
blob: fe7b1bf893ad75cde364b9b62af596371d2bc3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
import { getFilenameFromPath } from "../paths";
jest.mock("../fileExists");

describe("getFilenameFromPath", () => {
  const EXAMPLE_PATH = "localhost/stoneddiscord/assets.png";
  it("Should get the last value from a path", async () => {
    const actual = getFilenameFromPath(EXAMPLE_PATH);
    const expected = "assets.png";
    expect(actual).toBe(expected);
  });
});