Properly skip Set tests in browsers that don't really support it

This commit is contained in:
Gregg Van Hove
2016-09-27 15:36:01 -07:00
parent 05097b3e42
commit bad9c63bf7
3 changed files with 26 additions and 8 deletions
+2 -2
View File
@@ -15,13 +15,13 @@ describe("jasmineUnderTest.pp", function () {
});
describe('stringify sets', function() {
if (typeof Set === 'undefined') { return; }
it("should stringify sets properly", function() {
jasmine.getEnv().requireFunctioningSets();
expect(jasmineUnderTest.pp(new Set([1, 2]))).toEqual("Set( 1, 2 )");
});
it("should truncate sets with more elments than jasmineUnderTest.MAX_PRETTY_PRINT_ARRAY_LENGTH", function() {
jasmine.getEnv().requireFunctioningSets();
var originalMaxSize = jasmineUnderTest.MAX_PRETTY_PRINT_ARRAY_LENGTH;
try {