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 95765e61d1
commit f241f300ef

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}}/>`);