Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb8344b

Browse filesBrowse files
trootskigibfahn
authored andcommitted
test: use default assertion messages
The string literal messages in addons-napi/test_buffer/test.js are less helpful than the default messages, so use the default messages. PR-URL: #16808 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent d2b32ce commit eb8344b
Copy full SHA for eb8344b

File tree

Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed
Open diff view settings
Filter options
  • test/addons-napi/test_buffer
Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed
Open diff view settings
Collapse file

‎test/addons-napi/test_buffer/test.js‎

Copy file name to clipboardExpand all lines: test/addons-napi/test_buffer/test.js
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ const common = require('../../common');
55
const binding = require(`./build/${common.buildType}/test_buffer`);
66
const assert = require('assert');
77

8-
assert.strictEqual(binding.newBuffer().toString(), binding.theText,
9-
'buffer returned by newBuffer() has wrong contents');
10-
assert.strictEqual(binding.newExternalBuffer().toString(), binding.theText,
11-
'buffer returned by newExternalBuffer() has wrong contents');
8+
assert.strictEqual(binding.newBuffer().toString(), binding.theText);
9+
assert.strictEqual(binding.newExternalBuffer().toString(), binding.theText);
1210
console.log('gc1');
1311
global.gc();
1412
assert.strictEqual(binding.getDeleterCallCount(), 1, 'deleter was not called');
15-
assert.strictEqual(binding.copyBuffer().toString(), binding.theText,
16-
'buffer returned by copyBuffer() has wrong contents');
13+
assert.strictEqual(binding.copyBuffer().toString(), binding.theText);
1714

1815
let buffer = binding.staticBuffer();
1916
assert.strictEqual(binding.bufferHasInstance(buffer), true,
2017
'buffer type checking fails');
21-
assert.strictEqual(binding.bufferInfo(buffer), true, 'buffer data is accurate');
18+
assert.strictEqual(binding.bufferInfo(buffer), true);
2219
buffer = null;
2320
global.gc();
2421
console.log('gc2');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.