adobe / reactor-sdk-javascript

JavaScript SDK for the Reactor API
Apache License 2.0
12 stars 10 forks source link

Fix flaky tests #7

Closed perlmonger42 closed 5 years ago

perlmonger42 commented 5 years ago

Some tests were failing because they assumed the first page of listFooForBar was sufficient. Fixed them to page through all the results.

Some tests were failing because they take longer than the Jasmine timeout for async callbacks. I spent some time trying to fine-tune the timeouts for each test, but in the end it made more sense to just tell Jasmine to be patient -- all tests now have a timeout of 5 minutes, though most return in under 5 seconds.

I've also moved a lot of test setup code from beforeAll blocks into the individual tests.