From a5378ebd499b3a05dd0cbc88b6a41a6827f451e0 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 24 May 2023 11:01:56 +0100 Subject: [PATCH] Merge pull request #13175 from overleaf/msm-flaky-tests [web] replace clock.runAll() with clock.next() in flaky tests GitOrigin-RevId: 62ea59315597d9ecd0e143418f65382644ed8345 --- .../TpdsUpdateHandlerTests.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/services/web/test/unit/src/ThirdPartyDataStore/TpdsUpdateHandlerTests.js b/services/web/test/unit/src/ThirdPartyDataStore/TpdsUpdateHandlerTests.js index dacff0a41b..75b3ef5398 100644 --- a/services/web/test/unit/src/ThirdPartyDataStore/TpdsUpdateHandlerTests.js +++ b/services/web/test/unit/src/ThirdPartyDataStore/TpdsUpdateHandlerTests.js @@ -502,13 +502,9 @@ function expectProjectCreated() { ).to.have.been.calledWith(this.userId, this.projectName) }) - /** - * Temporarily disable flaky test - */ - // eslint-disable-next-line mocha/no-skipped-tests - it.skip('sets the root doc', function () { + it('sets the root doc', function () { // Fire pending timers - this.clock.runAll() + this.clock.next() expect( this.RootDocManager.promises.setRootDocAutomatically ).to.have.been.calledWith(this.projects.active1._id) @@ -521,13 +517,9 @@ function expectProjectNotCreated() { .been.called }) - /** - * Temporarily disable flaky test - */ - // eslint-disable-next-line mocha/no-skipped-tests - it.skip('does not set the root doc', function () { + it('does not set the root doc', function () { // Fire pending timers - this.clock.runAll() + this.clock.next() expect(this.RootDocManager.promises.setRootDocAutomatically).not.to.have .been.called })