fix(tests): Stabilize flaky tests (#3876)

* Longer TTL, shorter wait

* Makes sure we wait for the logout

- Parse.User.logOut is async and was making a test flaky
This commit is contained in:
Florent Vilmart
2017-05-28 20:01:33 -04:00
committed by GitHub
parent 57efd89b3d
commit 73aafa2d24
2 changed files with 15 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ const InMemoryCache = require('../src/Adapters/Cache/InMemoryCache').default;
describe('InMemoryCache', function() {
var BASE_TTL = {
ttl: 10
ttl: 100
};
var NO_EXPIRE_TTL = {
ttl: NaN
@@ -28,7 +28,7 @@ describe('InMemoryCache', function() {
var value = cache.get(KEY);
expect(value).toEqual(VALUE);
wait(BASE_TTL.ttl * 5).then(() => {
wait(BASE_TTL.ttl * 2).then(() => {
value = cache.get(KEY)
expect(value).toEqual(null);
done();