We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 091f01b commit abf33f8Copy full SHA for abf33f8
tests/specs/cors/cors.spec.js
@@ -43,13 +43,20 @@ describe('CORS support', function() {
43
.parse('http://petstore.swagger.io:80/v2/swagger.json', {
44
http: { withCredentials: true }
45
})
46
- .then(helper.shouldNotGetCalled)
47
.catch(function(err) {
+ // The request failed, which is expected
48
expect(err.message).to.contain('Error downloading file');
49
-
+ })
50
+ .then(function(schema) {
51
+ // The request succeeded, which means this browser doesn't support CORS.
52
+ expect(schema).to.be.an('object');
53
+ expect(schema).not.to.be.empty;
54
+ expect(parser.schema).to.equal(schema);
55
56
+ .then(function() {
57
// Restore the original error handler
58
global.onerror = oldOnError;
- });
59
60
});
61
}
62
0 commit comments