Skip to content

Commit

Permalink
fix test relying on async setup
Browse files Browse the repository at this point in the history
  • Loading branch information
BobrImperator committed Jul 23, 2021
1 parent 5ef9fee commit a942305
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ export default function(options) {
);
});

// eslint-disable-next-line require-await
it('clears cached expiration times when setting expiration to null', async function() {
run(() => {
store.set('cookieExpirationTime', null);
Expand Down Expand Up @@ -330,16 +329,15 @@ export default function(options) {
let cookieName = 'ember_simple_auth-session-expiration_time';
let expirationTime = 60 * 60 * 24;

beforeEach(function() {
beforeEach(async function() {
store = options.store(sinon, this.owner, {
cookieExpirationTime: expirationTime,
});
cookieService = store.get('_cookies');
cookieService.write(cookieName, expirationTime);
await cookieService.write(cookieName, expirationTime);
});

// eslint-disable-next-line require-await
it('restores expiration time from cookie', async function() {
it('restores expiration time from cookie', function() {
expect(store.get('cookieExpirationTime')).to.equal(expirationTime);
});
});
Expand Down

0 comments on commit a942305

Please sign in to comment.