diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index 02f0a3a718bdec..dd535fe5035fc5 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -203,7 +203,7 @@ assert.throws( if (common.enoughTestMem) { assert.throws( - () => new StringDecoder().write(Buffer.alloc(0x1fffffe8 + 1).fill('a')), + () => new StringDecoder().write(Buffer.alloc((process.arch === 'ia32' ? 0x18ffffe8 : 0x1fffffe8) + 1).fill('a')), { code: 'ERR_STRING_TOO_LONG', }