diff --git a/test/unit/runnable.spec.js b/test/unit/runnable.spec.js index f87ab1a727..333b5dc333 100644 --- a/test/unit/runnable.spec.js +++ b/test/unit/runnable.spec.js @@ -46,7 +46,7 @@ describe('Runnable(title, fn)', function () { it('should set disabled', function () { var run = new Runnable(); run.timeout(1e10); - expect(run.enableTimeouts()).to.be(false); + expect(run.enableTimeouts()).to.equal(false); }); }); @@ -445,7 +445,7 @@ describe('Runnable(title, fn)', function () { }); test.run(function (err) { - expect(err).to.eql(expectedErr); + expect(err.message).to.equal(expectedErr.message); done(); }); }); diff --git a/test/unit/runner.spec.js b/test/unit/runner.spec.js index 36ae0ee222..f32383d31a 100644 --- a/test/unit/runner.spec.js +++ b/test/unit/runner.spec.js @@ -80,6 +80,12 @@ describe('Runner', function () { }); describe('.checkGlobals(test)', function () { + before(function () { + if (!Object.create) { + this.skip(); + } + }); + it('should allow variables that match a wildcard', function (done) { runner.globals(['foo*', 'giz*']); global.foo = 'baz'; @@ -292,6 +298,11 @@ describe('Runner', function () { }); it('should recover if the error stack is not writable', function (done) { + if (!Object.create) { + this.skip(); + return; + } + var err = new Error('not evil'); Object.defineProperty(err, 'stack', { value: err.stack diff --git a/test/unit/utils.spec.js b/test/unit/utils.spec.js index fe4849238e..ad64fd847c 100644 --- a/test/unit/utils.spec.js +++ b/test/unit/utils.spec.js @@ -510,6 +510,11 @@ describe('lib/utils', function () { describe('map()', function () { var map = utils.map; it('should behave same as Array.prototype.map', function () { + if (!Array.prototype.map) { + this.skip(); + return; + } + var arr = [ 1, 2,