IKHSAN
ENID Baca dalam Bahasa Indonesia

homeio

Public

Forked from doctor-io/homeio

Branch
main
Latest commit
958d74616 October 2026

password.test.ts

Open raw
import { describe, expect, it } from "vitest";
import {
  hashPassword,
  verifyPassword,
} from "@/lib/server/modules/auth/password";

describe("auth password helpers", () => {
  it("hashes and verifies password", async () => {
    const hash = await hashPassword("StrongPass123");

    expect(hash).toContain(":");
    await expect(verifyPassword("StrongPass123", hash)).resolves.toBe(true);
    await expect(verifyPassword("WrongPass123", hash)).resolves.toBe(false);
  });
});
bytes
481
lines
16
Type
ts
Latest commit
16 October 2026