Skip to content

Commit bd8e023

Browse files
skip certain tests that cause problems with SauceLabs
1 parent f83f2ad commit bd8e023

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

karma.conf.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ function configureSauceLabs (config) {
162162
config.exclude = [
163163
'test/specs/__*/**',
164164
'test/specs/blank/**',
165-
'test/specs/parsers/**'
165+
'test/specs/empty/**',
166+
'test/specs/invalid/**',
167+
'test/specs/parsers/**',
166168
];
167169
}

test/specs/invalid/invalid.spec.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@ describe('Invalid syntax', function () {
22
'use strict';
33

44
describe('in main file', function () {
5-
// Safari and IE crash when running this test via Karma + SauceLabs
6-
if (!(host.karma && host.env.SAUCE && (host.browser.IE || host.browser.safari))) {
7-
it('should throw an error for an invalid file path', function () {
8-
return $RefParser
9-
.dereference('this file does not exist')
10-
.then(helper.shouldNotGetCalled)
11-
.catch(function (err) {
12-
expect(err).to.be.an.instanceOf(Error);
13-
if (host.node) {
14-
expect(err.code).to.equal('ENOENT');
15-
expect(err.message).to.contain('Error opening file ');
16-
}
17-
});
18-
});
19-
}
5+
it('should throw an error for an invalid file path', function () {
6+
return $RefParser
7+
.dereference('this file does not exist')
8+
.then(helper.shouldNotGetCalled)
9+
.catch(function (err) {
10+
expect(err).to.be.an.instanceOf(Error);
11+
if (host.node) {
12+
expect(err.code).to.equal('ENOENT');
13+
expect(err.message).to.contain('Error opening file ');
14+
}
15+
});
16+
});
2017

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

0 commit comments

Comments
 (0)