This commit is contained in:
Tom Moor
2024-01-08 21:02:12 -05:00
parent f08c426715
commit 0986276d7e
2 changed files with 18 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
import sharedEnv from "@shared/env";
import parseDocumentSlug from "./parseDocumentSlug";
sharedEnv.URL = "https://app.outline.dev";
describe("#parseDocumentSlug", () => {
it("should work with fully qualified url", () => {
expect(
@@ -34,4 +37,10 @@ describe("#parseDocumentSlug", () => {
"my-doc-y4j4tR4UuV"
);
});
it("should work with path and hash", () => {
expect(parseDocumentSlug("/doc/my-doc-y4j4tR4UuV#my-heading-hash")).toEqual(
"my-doc-y4j4tR4UuV"
);
});
});