mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-27 08:08:11 +00:00
14 lines
428 B
TypeScript
14 lines
428 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resetLinkToken } from "./resetLinkToken";
|
|
|
|
describe("resetLinkToken", () => {
|
|
it("reads the token from the fragment", () => {
|
|
expect(resetLinkToken("#session=a.b.c")).toBe("a.b.c");
|
|
});
|
|
|
|
it("is empty without a token in the fragment", () => {
|
|
expect(resetLinkToken("#other=1")).toBe("");
|
|
expect(resetLinkToken("")).toBe("");
|
|
});
|
|
});
|