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: use error code mapping in place of raw errno #38675

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
4 changes: 2 additions & 2 deletions test/parallel/test-fs-read-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fs.read(fd,
common.mustCall((err) => {
if (err) {
if (common.isIBMi)
assert.strictEqual(err.errno, -127);
assert.strictEqual(err.code, 'EOVERFLOW');
else
assert.strictEqual(err.code, 'EFBIG');
}
Expand Down Expand Up @@ -238,6 +238,6 @@ try {
// On systems where max file size is below 2^53-1, we'd expect a EFBIG error.
// This is not using `assert.throws` because the above call should not raise
// any error on systems that allows file of that size.
if (err.code !== 'EFBIG' && !(common.isIBMi && err.errno === -127))
if (err.code !== 'EFBIG' && !(common.isIBMi && err.code === 'EOVERFLOW'))
throw err;
}