-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The following code reproduces the issue:
require("should");
const a = (new Uint8Array([1])).buffer;
const b = (new Uint8Array([2])).buffer;
console.log(a.constructor, b.constructor);
// [Function: ArrayBuffer] [Function: ArrayBuffer]
console.log(a.should.deepEqual(b)); // doesn't throw
/*
Assertion {
obj: ArrayBuffer { [Uint8Contents]: <01>, byteLength: 1 },
anyOne: false,
negate: false,
params: {
operator: 'to equal',
expected: ArrayBuffer { [Uint8Contents]: <02>, byteLength: 1 },
message: undefined,
details: '',
showDiff: true
}
}
*/
const c = new Uint8Array([1]);
const d = new Uint8Array([2]);
console.log(c.constructor, d.constructor);
// [Function: Uint8Array] [Function: Uint8Array]
console.log(c.should.deepEqual(d)); // throwsThe first deepEqual should throw as well, but it doesn't. I'm using shouldjs 13.2.3
Metadata
Metadata
Assignees
Labels
No labels