Skip to content

Commit

Permalink
disabled a test that was crashing IE and Safari in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Oct 5, 2018
1 parent 1f1577e commit f83f2ad
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions test/specs/invalid/invalid.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ describe('Invalid syntax', function () {
'use strict';

describe('in main file', function () {
it('should throw an error for an invalid file path', function () {
return $RefParser
.dereference('this file does not exist')
.then(helper.shouldNotGetCalled)
.catch(function (err) {
expect(err).to.be.an.instanceOf(Error);
if (host.node) {
expect(err.code).to.equal('ENOENT');
expect(err.message).to.contain('Error opening file ');
}
});
});
// Safari and IE crash when running this test via Karma + SauceLabs
if (!(host.karma && host.env.SAUCE && (host.browser.IE || host.browser.safari))) {
it('should throw an error for an invalid file path', function () {
return $RefParser
.dereference('this file does not exist')
.then(helper.shouldNotGetCalled)
.catch(function (err) {
expect(err).to.be.an.instanceOf(Error);
if (host.node) {
expect(err.code).to.equal('ENOENT');
expect(err.message).to.contain('Error opening file ');
}
});
});
}

it('should throw an error for an invalid YAML file', function () {
return $RefParser
Expand Down

0 comments on commit f83f2ad

Please sign in to comment.