pankod/refine

View on GitHub
packages/core/src/definitions/helpers/router/__tests__/split-to-segments.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { splitToSegments } from "../split-to-segments";

describe("splitToSegments", () => {
  it("should split a path to segments", () => {
    expect(splitToSegments("/a/b/c")).toEqual(["a", "b", "c"]);
  });

  it("should split a path to segments", () => {
    expect(splitToSegments("a/b/c")).toEqual(["a", "b", "c"]);
  });

  it("should split a path to segments", () => {
    expect(splitToSegments("/a/b/c/")).toEqual(["a", "b", "c"]);
  });
});