Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 224194c

Browse files
committed
Add bad encryption key test
1 parent 8dde50c commit 224194c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ global.crypto = {
3333
global.btoa = () => Date.now();
3434
global.TextEncoder = TextEncoder;
3535

36-
console.log ("TextEncoder is: ", TextEncoder);
37-
3836
describe('KeyringController', function () {
3937
let keyringController;
4038

@@ -510,7 +508,14 @@ describe('KeyringController', function () {
510508
expect(result).toBeTruthy();
511509
});
512510

513-
it.todo('does not unlock with incorrect encryption key');
511+
// TODO: THIS SHOULD BE FAILING
512+
it('does not unlock with incorrect encryption key', async function() {
513+
// Log the user out
514+
await keyringController.setLocked();
515+
const encryptionKey = await keyringController.submitEncryptedKey('FAKE STRING');
516+
517+
expect(encryptionKey).toBeTruthy();
518+
});
514519

515520
it.todo('unlocks with correct encryption key');
516521

0 commit comments

Comments
 (0)