mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-23 15:47:18 +01:00
17 lines
591 B
TypeScript
17 lines
591 B
TypeScript
import { resetIdentityCircuit } from '../../src/utils/http';
|
|
|
|
describe('resetIdentityCircuit', () => {
|
|
it('identity without password', () => {
|
|
const id = resetIdentityCircuit('username');
|
|
expect(id).toMatch(/username:[a-zA-Z0-9]+/);
|
|
});
|
|
it('identity with new password', () => {
|
|
const oldPass = 'abcd';
|
|
const id = resetIdentityCircuit(`username:${oldPass}`);
|
|
expect(id).toMatch(/username:[a-zA-Z0-9]+/);
|
|
const [, pass] = id.split(':');
|
|
expect(pass).not.toEqual(oldPass);
|
|
expect(pass.length).toEqual(16);
|
|
});
|
|
});
|