Skip to content

Commit

Permalink
🌹 Add a 64MB test case
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Oct 30, 2022
1 parent 45a61ad commit 5cf93b3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,16 @@ function assertArrayEqual (actual, expected) {
base64Decode('__--_--_--__', actual)
assertArrayEqual(actual, expected)
}

{
const actual = new Uint8Array(64 * 1024 * 1024)
const expected = Buffer.alloc(64 * 1024 * 1024)

for (let i = 0, length = expected.length; i < length; ++i) {
expected[i] = i % 256
}

base64Decode(expected.toString('base64'), actual)

assertArrayEqual(actual, expected)
}

0 comments on commit 5cf93b3

Please sign in to comment.