Add some unit tests that exercise jasmine.anything() and Map matching.

Follow-up to some recent commits that fixed issues around
jasmine.anything() matching. This simply adds some extra tests that
exercise usage of Symbols with jasmine.anything() and as Map keys.
This commit is contained in:
Zaven Muradyan
2017-10-24 22:39:31 -07:00
parent 0e95b04900
commit 89306551a0
2 changed files with 46 additions and 0 deletions

View File

@@ -39,6 +39,22 @@ describe("Anything", function() {
expect(anything.asymmetricMatch(new Set())).toBe(true);
});
it("matches a TypedArray", function() {
jasmine.getEnv().requireFunctioningTypedArrays();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch(new Uint32Array([]))).toBe(true);
});
it("matches a Symbol", function() {
jasmine.getEnv().requireFunctioningSets();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch(Symbol())).toBe(true);
});
it("doesn't match undefined", function() {
var anything = new jasmineUnderTest.Anything();