Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix errorMessages regular expressions from crypto-random #14271

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/parallel/test-crypto-random.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ const expectedErrorRegexp = /^TypeError: size must be a number >= 0$/;
new Uint8Array(new Array(10).fill(0))
];
const errMessages = {
offsetNotNumber: /offset must be a number/,
offsetOutOfRange: /offset out of range/,
offsetNotUInt32: /offset must be a uint32/,
sizeNotNumber: /size must be a number/,
sizeNotUInt32: /size must be a uint32/,
bufferTooSmall: /buffer too small/,
offsetNotNumber: /^TypeError: offset must be a number$/,
offsetOutOfRange: /^RangeError: offset out of range$/,
offsetNotUInt32: /^TypeError: offset must be a uint32$/,
sizeNotNumber: /^TypeError: size must be a number$/,
sizeNotUInt32: /^TypeError: size must be a uint32$/,
bufferTooSmall: /^RangeError: buffer too small$/,
};

for (const buf of bufs) {
Expand Down