-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into DDFBRA-217-opdater-unilogin-integration-til-…
…at-bruge-seneste-stil-anvisninger
- Loading branch information
Showing
29 changed files
with
810 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { expect, test, vi } from "vitest" | ||
|
||
import { resolveUrl } from "../lib/helpers/helper.routes" | ||
|
||
test("That resolveUrl can return a work url", async () => { | ||
const workUrl = resolveUrl({ type: "work", routeParams: { id: 123 } }) | ||
expect(workUrl).toBe("/work/123") | ||
}) | ||
|
||
test("That resolveUrl can return a work url with a manifestation type", async () => { | ||
const workUrl = resolveUrl({ | ||
type: "work", | ||
routeParams: { id: 123 }, | ||
queryParams: { audio: "true" }, | ||
}) | ||
expect(workUrl).toBe("/work/123?audio=true") | ||
}) | ||
|
||
test("That resolveUrl can return a search url", async () => { | ||
const workUrl = resolveUrl({ type: "search", queryParams: { q: "test" } }) | ||
expect(workUrl).toBe("/search?q=test") | ||
}) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.