diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js index cf1a3fd8eb200d..92aa7c3d045315 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, 'Invalid array buffer length'); + assert.equal(e.message, 'Array buffer allocation failed'); } // should work with number-coercible values diff --git a/test/parallel/test-stringbytes-external-at-max.js b/test/parallel/test-stringbytes-external-at-max.js index 5467d05a20104a..5c6455e808f217 100644 --- a/test/parallel/test-stringbytes-external-at-max.js +++ b/test/parallel/test-stringbytes-external-at-max.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js index 008bc8cbc017e5..1e434d53b3d26e 100644 --- a/test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js +++ b/test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js index 537c084ee0b2b6..ee3a64f5a0c87b 100644 --- a/test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js +++ b/test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js index f91f1f49ffa633..0213140a5fe5e3 100644 --- a/test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js +++ b/test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js index dc0719b0b214af..5ad8de9ccf6941 100644 --- a/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js +++ b/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js index 4028a944660899..6d7556578189fd 100644 --- a/test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js +++ b/test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js @@ -23,14 +23,14 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } assert.throws(function() { buf.toString(); -}, /"toString\(\)" failed|Invalid array buffer length/); +}, /"toString\(\)" failed|Array buffer allocation failed/); assert.throws(function() { buf.toString('utf8'); diff --git a/test/sequential/test-stringbytes-external-exceed-max-by-2.js b/test/sequential/test-stringbytes-external-exceed-max-by-2.js index 1ac5a5c7fe1ced..db21608637dfb2 100644 --- a/test/sequential/test-stringbytes-external-exceed-max-by-2.js +++ b/test/sequential/test-stringbytes-external-exceed-max-by-2.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; } diff --git a/test/sequential/test-stringbytes-external-exceed-max.js b/test/sequential/test-stringbytes-external-exceed-max.js index 173a2022a74a09..cf9dc37ec72594 100644 --- a/test/sequential/test-stringbytes-external-exceed-max.js +++ b/test/sequential/test-stringbytes-external-exceed-max.js @@ -23,7 +23,7 @@ try { gc(); } catch (e) { // If the exception is not due to memory confinement then rethrow it. - if (e.message !== 'Invalid array buffer length') throw (e); + if (e.message !== 'Array buffer allocation failed') throw (e); console.log(skipMessage); return; }