@@ -164,7 +164,7 @@ describe("matchersUtil", function() {
|
||||
|
||||
expect(jasmineUnderTest.matchersUtil.equals(a,b)).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
it("passes for equivalent Promises (GitHub issue #1314)", function() {
|
||||
if (typeof Promise === 'undefined') { return; }
|
||||
|
||||
@@ -524,6 +524,20 @@ describe("matchersUtil", function() {
|
||||
expect(jasmineUnderTest.matchersUtil.equals(mapA, mapB)).toBe(false);
|
||||
});
|
||||
|
||||
it("passes for ArrayBuffers with same length and content", function() {
|
||||
var buffer1 = new ArrayBuffer(4);
|
||||
var buffer2 = new ArrayBuffer(4);
|
||||
expect(jasmineUnderTest.matchersUtil.equals(buffer1, buffer2)).toBe(true);
|
||||
});
|
||||
|
||||
it("fails for ArrayBuffers with same length but different content", function() {
|
||||
var buffer1 = new ArrayBuffer(4);
|
||||
var buffer2 = new ArrayBuffer(4);
|
||||
var array1 = new Uint8Array(buffer1);
|
||||
array1[0] = 1;
|
||||
expect(jasmineUnderTest.matchersUtil.equals(buffer1, buffer2)).toBe(false);
|
||||
});
|
||||
|
||||
describe("when running in an environment with array polyfills", function() {
|
||||
var findIndexDescriptor = Object.getOwnPropertyDescriptor(Array.prototype, 'findIndex');
|
||||
if (!findIndexDescriptor) {
|
||||
|
||||
Reference in New Issue
Block a user