test
This commit is contained in:
@@ -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"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user