diff --git a/test/parallel/test-fs-read-type.js b/test/parallel/test-fs-read-type.js index 2baab18dc9f483..81ad7ecbbe9043 100644 --- a/test/parallel/test-fs-read-type.js +++ b/test/parallel/test-fs-read-type.js @@ -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'); } @@ -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; }