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.
 
 
 
 

10 lines
369 B

import { describe, expect, it } from "bun:test";
import { hashPassword, verifyPassword } from "../../server/utils/password";
describe("password", () => {
it("hashes and verifies", async () => {
const h = await hashPassword("hunter2");
expect(await verifyPassword("hunter2", h)).toBe(true);
expect(await verifyPassword("wrong", h)).toBe(false);
});
});