Skip to content

Commit 8728edb

Browse files
fixed a broken test
1 parent abf33f8 commit 8728edb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/specs/cors/cors.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ describe('CORS support', function() {
4343
.parse('http://petstore.swagger.io:80/v2/swagger.json', {
4444
http: { withCredentials: true }
4545
})
46-
.catch(function(err) {
47-
// The request failed, which is expected
48-
expect(err.message).to.contain('Error downloading file');
49-
})
5046
.then(function(schema) {
5147
// The request succeeded, which means this browser doesn't support CORS.
5248
expect(schema).to.be.an('object');
5349
expect(schema).not.to.be.empty;
5450
expect(parser.schema).to.equal(schema);
5551
})
52+
.catch(function(err) {
53+
// The request failed, which is expected
54+
expect(err.message).to.contain('Error downloading file');
55+
})
5656
.then(function() {
5757
// Restore the original error handler
5858
global.onerror = oldOnError;

0 commit comments

Comments
 (0)