mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
test: remove literals that obscure assert messages
Remove string literals as messages to `assert.strictEqual()`. They can be misleading here (where perhaps the reason an assertino failed isn't that the deleter wasn't called but rather was called too many times. Backport-PR-URL: https://github.com/nodejs/node/pull/19265 PR-URL: https://github.com/nodejs/node/pull/17642 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
1 parent
077e1870ae
commit
2e100c82be
1 file changed
+3
-4
@@ -9,14 +9,13 @@ assert.strictEqual(binding.newBuffer().toString(), binding.theText);
|
||||
assert.strictEqual(binding.newExternalBuffer().toString(), binding.theText);
|
||||
console.log('gc1');
|
||||
global.gc();
|
||||
assert.strictEqual(binding.getDeleterCallCount(), 1, 'deleter was not called');
|
||||
assert.strictEqual(binding.getDeleterCallCount(), 1);
|
||||
assert.strictEqual(binding.copyBuffer().toString(), binding.theText);
|
||||
|
||||
let buffer = binding.staticBuffer();
|
||||
assert.strictEqual(binding.bufferHasInstance(buffer), true,
|
||||
'buffer type checking fails');
|
||||
assert.strictEqual(binding.bufferHasInstance(buffer), true);
|
||||
assert.strictEqual(binding.bufferInfo(buffer), true);
|
||||
buffer = null;
|
||||
global.gc();
|
||||
console.log('gc2');
|
||||
assert.strictEqual(binding.getDeleterCallCount(), 2, 'deleter was not called');
|
||||
assert.strictEqual(binding.getDeleterCallCount(), 2);
|
||||
Reference in new issue
Block a user