Skip to content

Commit

Permalink
chore: Small test cleanup.
Browse files Browse the repository at this point in the history
Related issue:
midonet#90
  • Loading branch information
dmitry committed Nov 29, 2024
1 parent ec90b27 commit af31e81
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/parameters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ test("Size of N is correct", (t) => {
// Yes, the 256 bits number is actually 257 bits number
// https://groups.google.com/forum/#!topic/clipperz/DJFqZYHv2qk
const expectedSizeInBytes: number[] = [33, 64, 96, 128, 192, 256];
const actualSizeInBytes: number[] = new Array(6).fill(0);
Object.keys(SRPParameters.PrimeGroup).map((key, idx) => {
actualSizeInBytes[idx] = bigIntToArrayBuffer(
SRPParameters.PrimeGroup[key].N,
).byteLength;
});
actualSizeInBytes.sort((x, y) => x - y);
const actualSizeInBytes: number[] = Object.keys(SRPParameters.PrimeGroup).map(
(key) => bigIntToArrayBuffer(SRPParameters.PrimeGroup[key].N).byteLength,
);
t.deepEqual(expectedSizeInBytes, actualSizeInBytes, "N sizes are correct");
});

0 comments on commit af31e81

Please sign in to comment.