attempts to fix flaky token-expire-warning test (#16197)

This commit is contained in:
Jordan Reimer 2022-06-29 16:09:08 -06:00 committed by GitHub
parent d353245af3
commit 8b7976f137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2,13 +2,13 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { find, render, waitUntil } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { addMinutes } from 'date-fns';
import { addMinutes, subMinutes } from 'date-fns';
module('Integration | Component | token-expire-warning', function (hooks) {
setupRenderingTest(hooks);
test('it renders a warning when the token is expired', async function (assert) {
const expirationDate = Date.now();
const expirationDate = subMinutes(Date.now(), 30);
this.set('expirationDate', expirationDate);
await render(hbs`<TokenExpireWarning @expirationDate={{expirationDate}}/>`);