Skip to content

Commit

Permalink
Updated the real-world API tests from apis.guru
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Apr 4, 2016
1 parent 0fcc749 commit 018e6ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/specs/real-world/real-world.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('Real-world APIs', function() {
delete apis['motaword.com']; // invalid (see https://github.com/BigstickCarpet/swagger-parser/issues/26)
delete apis['uploady.com']; // invalid (see https://github.com/BigstickCarpet/swagger-parser/issues/26)
delete apis['watchful.li']; // invalid (see https://github.com/BigstickCarpet/swagger-parser/issues/26)
delete apis['versioneye.com']; // invalid (same reason as above)

// Transform the list into an array of {name: string, url: string}
realWorldAPIs = [];
Expand All @@ -34,6 +35,14 @@ describe('Real-world APIs', function() {
});
});

beforeEach(function() {
// Some of these APIs are vary large, so we need to increase the timouts
// to allow time for them to be downloaded, dereferenced, and validated.
// so we need to increase the timeouts to allow for that
this.currentTest.timeout(30000);
this.currentTest.slow(5000);
});

// Mocha requires us to create our tests synchronously. But the list of APIs is downloaded asynchronously.
// So, we just create 200 placeholder tests, and then rename them later to reflect which API they're testing.
for (var i = 1; i <= 300; i++) {
Expand Down

0 comments on commit 018e6ee

Please sign in to comment.