Skip to content

Commit d054e94

Browse files
pcdevilcjihrig
authored andcommitted
test: add detailed message for assertion failure
PR-URL: #16812 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent 6831e42 commit d054e94

File tree

1 file changed

+3
-1
lines changed
  • test/addons-napi/test_typedarray

1 file changed

+3
-1
lines changed

test/addons-napi/test_typedarray/test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ arrayTypes.forEach((currentType) => {
4949
const theArray = test_typedarray.CreateTypedArray(template, buffer);
5050

5151
assert.ok(theArray instanceof currentType,
52-
'Type of new array should match that of the template');
52+
'Type of new array should match that of the template. ' +
53+
`Expected type: ${currentType.name}, ` +
54+
`actual type: ${template.constructor.name}`);
5355
assert.notStrictEqual(theArray, template);
5456
assert.strictEqual(theArray.buffer, buffer);
5557
});

0 commit comments

Comments
 (0)