mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-06 23:32:08 +00:00
Galaxie familiale : personnes, unions et filiations, photos, vidéos et voix sur chaque personne, partage par lien avec consultation sans compte et contributions validées par le propriétaire. Auto-hébergeable avec Docker. Licence PolyForm Noncommercial 1.0.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
15 lines
478 B
TypeScript
15 lines
478 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { hashPassword, verifyPassword } from '../src/lib/auth.js'
|
|
|
|
describe('auth password helpers', () => {
|
|
it('hashes and verifies passwords', async () => {
|
|
const password = 'super-safe-password'
|
|
const hash = await hashPassword(password)
|
|
|
|
expect(hash).not.toBe(password)
|
|
expect(await verifyPassword(password, hash)).toBe(true)
|
|
expect(await verifyPassword('wrong-password', hash)).toBe(false)
|
|
}, 15000)
|
|
})
|