From e613f7245b6fd2744638a55d667e2159f50ae8b3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 16 May 2019 16:53:42 -0400 Subject: [PATCH] Work around issue with pauseTest() timing out. Tested locally by: * setting `QUnit.config.testTimeout` to `10` * add `await this.pauseTest()` to [can render a simple template](https://github.com/emberjs/ember-qunit/blob/489d4d69b7360e3b4c26beea67d6728afdc47536/tests/integration/setup-rendering-test-test.js#L21) test * confirm that `can render a simple template` fails without modifications * add these changes * confirm test waits indefinitely --- addon-test-support/ember-qunit/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addon-test-support/ember-qunit/index.js b/addon-test-support/ember-qunit/index.js index e387f8be..1d432544 100644 --- a/addon-test-support/ember-qunit/index.js +++ b/addon-test-support/ember-qunit/index.js @@ -34,6 +34,11 @@ export function setupTest(hooks, _options) { this.pauseTest = function QUnit_pauseTest() { assert.timeout(-1); // prevent the test from timing out + // This is a temporary work around for + // https://github.com/emberjs/ember-qunit/issues/496 this clears the + // timeout that would fail the test when it hits the global testTimeout + // value. + clearTimeout(QUnit.config.timeout); return originalPauseTest.call(this); }; });