diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js index e652a6a0f95969..d7b4f486e21422 100644 --- a/test/parallel/test-buffer-slow.js +++ b/test/parallel/test-buffer-slow.js @@ -30,7 +30,7 @@ assert.strictEqual(SlowBuffer(0).length, 0); try { assert.strictEqual(SlowBuffer(buffer.kMaxLength).length, buffer.kMaxLength); } catch (e) { - assert.equal(e.message, 'Buffer allocation failed - process out of memory'); + assert.equal(e.message, 'Invalid array buffer length'); } // should work with number-coercible values diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index be0c90d47f9f1f..615dccc13f2b22 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -115,12 +115,12 @@ var PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS; assert.throws(function() { new Buffer(kStringMaxLength + 1).toString(); - }, /toString failed|Buffer allocation failed/); + }, /toString failed|Invalid array buffer length/); try { new Buffer(kStringMaxLength * 4); } catch(e) { - assert.equal(e.message, 'Buffer allocation failed - process out of memory'); + assert.equal(e.message, 'Invalid array buffer length'); console.log( '1..0 # Skipped: intensive toString tests due to memory confinements'); return;