fix adapters

This commit is contained in:
2025-12-23 20:43:57 +01:00
parent b5431355ca
commit 16cd572c63
28 changed files with 1357 additions and 15 deletions

View File

@@ -0,0 +1,14 @@
import { describe, expect, it } from 'vitest';
import { InMemoryPasswordHashingService } from './InMemoryPasswordHashingService';
describe('InMemoryPasswordHashingService', () => {
it('hashes and verifies deterministically', async () => {
const service = new InMemoryPasswordHashingService();
const hash = await service.hash('secret');
expect(hash).toBe('demo_salt_terces');
expect(await service.verify('secret', hash)).toBe(true);
expect(await service.verify('wrong', hash)).toBe(false);
});
});