Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Nov 11, 2024
1 parent fcf1468 commit 620e012
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions packages/core/src/security/Manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ vi.mock("node:crypto", async () => {
};
});

test("constructor() -> should set the network key, auth key and encryption key", (t) => {
test("constructor() -> should set the network key, auth key and encryption key", async (t) => {
const man = new SecurityManager(options);
t.expect(man.networkKey).toStrictEqual(networkKey);
t.expect(isUint8Array(man.authKey)).toBe(true);
t.expect(man.authKey.length).toBe(16);
t.expect(isUint8Array(man.encryptionKey)).toBe(true);
t.expect(man.encryptionKey.length).toBe(16);
const authKey = await man.getAuthKey();
const encryptionKey = await man.getEncryptionKey();
t.expect(isUint8Array(authKey)).toBe(true);
t.expect(authKey).toHaveLength(16);
t.expect(isUint8Array(encryptionKey)).toBe(true);
t.expect(encryptionKey).toHaveLength(16);
});

test("constructor() -> should throw if the network key doesn't have length 16", (t) => {
Expand Down
2 changes: 1 addition & 1 deletion specs
Submodule specs updated 1 files
+ NIST.SP.800-38a.pdf

0 comments on commit 620e012

Please sign in to comment.