install ember-sinon-qunit (#26807)

* install ember-sinon-qunit

* replace stubbed timestamps part 1

* replace clients/ timestamp stubs

* actually stub correctly

* oops got a little excited, these dont need replacing

* and revert client ones as well

* oh my gosh claire stop rushing

* there we go

* move timestamp stub to beforeEach

* more moves to beforeEach

* final CE test moves to beforeEach hook!

* use .replace and .fake instead of callsFake

* license-banner test

* remove remaining callsFake for consistency

* use the timestamp instead of separate date
This commit is contained in:
claire bontempo
2024-05-06 15:11:00 +01:00
committed by GitHub
parent 1bfc4f90eb
commit b58084291e
20 changed files with 59 additions and 242 deletions

View File

@@ -19,15 +19,8 @@ module('Integration | Component | dashboard/client-count-card', function (hooks)
setupRenderingTest(hooks);
setupMirage(hooks);
hooks.before(function () {
sinon.stub(timestamp, 'now').callsFake(() => STATIC_NOW);
});
hooks.after(function () {
timestamp.now.restore();
});
test('it should display client count information', async function (assert) {
sinon.replace(timestamp, 'now', sinon.fake.returns(STATIC_NOW));
assert.expect(6);
const { months, total } = ACTIVITY_RESPONSE_STUB;
const [latestMonth] = months.slice(-1);