test: add detailed message for assertion failure
PR-URL: https://github.com/nodejs/node/pull/16812 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
parent
ac1e6bda89
commit
2336df1b50
@ -49,7 +49,9 @@ arrayTypes.forEach((currentType) => {
|
||||
const theArray = test_typedarray.CreateTypedArray(template, buffer);
|
||||
|
||||
assert.ok(theArray instanceof currentType,
|
||||
'Type of new array should match that of the template');
|
||||
'Type of new array should match that of the template. ' +
|
||||
`Expected type: ${currentType.name}, ` +
|
||||
`actual type: ${template.constructor.name}`);
|
||||
assert.notStrictEqual(theArray, template);
|
||||
assert.strictEqual(theArray.buffer, buffer);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user