This commit is contained in:
DrSmoothl committed 2026-10-12 15:43:34 +08:00
1 parent effeb66554
commit 7c0519f75f
977 files changed
+198426 -158324

No files matched your search

@@ -2,11 +2,11 @@ import { describe, expect, it } from 'vitest';
import { parseSecondFactor } from '../src/lib/totp-second-factor';
describe('parseSecondFactor', () => {
it('treats a 6-digit code as TOTP, ignoring spaces', () => {
expect(parseSecondFactor('287 082')).toEqual({ totp: '287082' });
});
it('treats a 6-digit code as TOTP, ignoring spaces', () => {
expect(parseSecondFactor('287 082')).toEqual({ totp: '287082' });
});
it('treats a recovery code as a recovery code', () => {
expect(parseSecondFactor('AB3D-K7MQ')).toEqual({ recoveryCode: 'AB3D-K7MQ' });
});
it('treats a recovery code as a recovery code', () => {
expect(parseSecondFactor('AB3D-K7MQ')).toEqual({ recoveryCode: 'AB3D-K7MQ' });
});
});