Skip to content

Commit 021ccb4

Browse files
trootskicjihrig
authored andcommittedNov 6, 2017
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 <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 2156828 commit 021ccb4

File tree

1 file changed

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

1 file changed

+4
-7
lines changed
 

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

+4-7
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)