fix adapters
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user