pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/nodejs/node/commit/246aeaca1ed47e245ee4c92084b59f5ddb31163c

mer-b69241e157469407.css" /> test: remove literals that obscure assert messages · nodejs/node@246aeac · GitHub
Skip to content

Commit 246aeac

Browse files
committed
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. PR-URL: #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>
1 parent f86427e commit 246aeac

File tree

1 file changed

+3
-4
lines changed
  • test/addons-napi/test_buffer

1 file changed

+3
-4
lines changed

test/addons-napi/test_buffer/test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ assert.strictEqual(binding.newBuffer().toString(), binding.theText);
99
assert.strictEqual(binding.newExternalBuffer().toString(), binding.theText);
1010
console.log('gc1');
1111
global.gc();
12-
assert.strictEqual(binding.getDeleterCallCount(), 1, 'deleter was not called');
12+
assert.strictEqual(binding.getDeleterCallCount(), 1);
1313
assert.strictEqual(binding.copyBuffer().toString(), binding.theText);
1414

1515
let buffer = binding.staticBuffer();
16-
assert.strictEqual(binding.bufferHasInstance(buffer), true,
17-
'buffer type checking fails');
16+
assert.strictEqual(binding.bufferHasInstance(buffer), true);
1817
assert.strictEqual(binding.bufferInfo(buffer), true);
1918
buffer = null;
2019
global.gc();
2120
console.log('gc2');
22-
assert.strictEqual(binding.getDeleterCallCount(), 2, 'deleter was not called');
21+
assert.strictEqual(binding.getDeleterCallCount(), 2);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy