diff --git a/tests/unit/dom/wait-for-test.js b/tests/unit/dom/wait-for-test.js index 9e2d0f9d1..24bf76221 100644 --- a/tests/unit/dom/wait-for-test.js +++ b/tests/unit/dom/wait-for-test.js @@ -71,10 +71,22 @@ module('DOM Helper: waitFor', function(hooks) { let start = Date.now(); try { - await waitFor('.something', { timeout: 100, timeoutMessage: '.something timed out' }); + await waitFor('.something', { timeout: 100 }); } catch (error) { let end = Date.now(); assert.ok(end - start >= 100, 'timed out after correct time'); + assert.equal(error.message, 'waitFor timed out'); + } + }); + + test('wait for selector with timeoutMessage', async function(assert) { + assert.expect(1); + + await setupContext(context); + + try { + await waitFor('.something', { timeoutMessage: '.something timed out' }); + } catch (error) { assert.equal(error.message, '.something timed out'); } });