Skip to content

Commit

Permalink
skip certain tests that cause problems with SauceLabs
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Oct 5, 2018
1 parent f83f2ad commit bd8e023
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
4 changes: 3 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ function configureSauceLabs (config) {
config.exclude = [
'test/specs/__*/**',
'test/specs/blank/**',
'test/specs/parsers/**'
'test/specs/empty/**',
'test/specs/invalid/**',
'test/specs/parsers/**',
];
}
27 changes: 12 additions & 15 deletions test/specs/invalid/invalid.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ describe('Invalid syntax', function () {
'use strict';

describe('in main file', function () {
// 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 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 bd8e023

Please sign in to comment.