Skip to content

Commit

Permalink
fix some problem tests in obsolete browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jun 14, 2017
1 parent fa0169b commit 31a8acf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/runnable.spec.js
Expand Up @@ -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);
});
});

Expand Down Expand Up @@ -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();
});
});
Expand Down
11 changes: 11 additions & 0 deletions test/unit/runner.spec.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions test/unit/utils.spec.js
Expand Up @@ -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,
Expand Down

0 comments on commit 31a8acf

Please sign in to comment.