You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
401 B
15 lines
401 B
import { describe, expect, it } from "bun:test";
|
|
import {
|
|
hashChallengeToken,
|
|
randomUrlToken,
|
|
} from "../../server/utils/challenge-token";
|
|
|
|
describe("challenge-token", () => {
|
|
it("hash is stable", () => {
|
|
expect(hashChallengeToken("abc")).toBe(hashChallengeToken("abc"));
|
|
});
|
|
|
|
it("random has reasonable length", () => {
|
|
expect(randomUrlToken().length).toBeGreaterThan(20);
|
|
});
|
|
});
|
|
|