diff options
author | brad-decker <bhdecker84@gmail.com> | 2016-11-29 12:33:28 -0600 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-12-01 13:50:25 -0600 |
commit | 18016d3b3fd27fd2744a17a54f15631af6206df1 (patch) | |
tree | 2a6b765d9f668ab212cbf154ec2db0bbd32bb72b /test/addons/stringbytes-external-exceed-max | |
parent | cf719152b01a68bc65f80842799b4c6be0299d78 (diff) | |
download | android-node-v8-18016d3b3fd27fd2744a17a54f15631af6206df1.tar.gz android-node-v8-18016d3b3fd27fd2744a17a54f15631af6206df1.tar.bz2 android-node-v8-18016d3b3fd27fd2744a17a54f15631af6206df1.zip |
test: replace assert.equal with assert.strictEqual
Using NodeTodo I learned of a need to swap out the .equal function
with .strictEqual in a few test files.
https://twitter.com/NodeTodo/status/803657321993961472
https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c
additional commits squashed:
.strictEqual's argument signature is actual, expected, [message].
Previously some statements were listed as expected, actual.
As asked in PR i swapped them to match the correct argument signature.
PR-URL: https://github.com/nodejs/node/pull/9842
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test/addons/stringbytes-external-exceed-max')
3 files changed, 4 insertions, 4 deletions
diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js index bd71f05d61..2ce695852e 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js @@ -30,4 +30,4 @@ if (!binding.ensureAllocation(2 * kStringMaxLength)) { } const maxString = buf.toString('latin1'); -assert.equal(maxString.length, kStringMaxLength); +assert.strictEqual(maxString.length, kStringMaxLength); diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js index c54706fd46..51324a3f33 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js @@ -34,9 +34,9 @@ assert.throws(function() { }, /"toString\(\)" failed/); var maxString = buf.toString('latin1', 1); -assert.equal(maxString.length, kStringMaxLength); +assert.strictEqual(maxString.length, kStringMaxLength); // Free the memory early instead of at the end of the next assignment maxString = undefined; maxString = buf.toString('latin1', 0, kStringMaxLength); -assert.equal(maxString.length, kStringMaxLength); +assert.strictEqual(maxString.length, kStringMaxLength); diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js index 11f23ff1bf..0fab606e46 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js @@ -30,4 +30,4 @@ if (!binding.ensureAllocation(2 * kStringMaxLength)) { } const maxString = buf.toString('utf16le'); -assert.equal(maxString.length, (kStringMaxLength + 2) / 2); +assert.strictEqual(maxString.length, (kStringMaxLength + 2) / 2); |