diff options
Diffstat (limited to 'addons/mail/static/src/utils/timer/timer_tests.js')
| -rw-r--r-- | addons/mail/static/src/utils/timer/timer_tests.js | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/addons/mail/static/src/utils/timer/timer_tests.js b/addons/mail/static/src/utils/timer/timer_tests.js index 9b464ac9396..e2d33e91585 100644 --- a/addons/mail/static/src/utils/timer/timer_tests.js +++ b/addons/mail/static/src/utils/timer/timer_tests.js @@ -1,13 +1,8 @@ odoo.define('mail/static/src/utils/timer/timer_tests.js', function (require) { 'use strict'; -const { - afterEach: utilsAfterEach, - beforeEach: utilsBeforeEach, - start, -} = require('mail/static/src/utils/test_utils.js'); +const { afterEach, beforeEach, nextTick, start } = require('mail/static/src/utils/test_utils.js'); const Timer = require('mail/static/src/utils/timer/timer.js'); -const { nextTick } = require('mail/static/src/utils/test_utils.js'); const { TimerClearedError } = Timer; @@ -16,23 +11,24 @@ QUnit.module('utils', {}, function () { QUnit.module('timer', {}, function () { QUnit.module('timer_tests.js', { beforeEach() { - utilsBeforeEach(this); + beforeEach(this); this.timers = []; - this.start = async (...args) => { - const { env, widget } = await start(...args); + this.start = async (params) => { + const { env, widget } = await start(Object.assign({}, params, { + data: this.data, + })); this.env = env; this.widget = widget; }; }, afterEach() { - utilsAfterEach(this); // Important: tests should cleanly intercept cancelation errors that // may result from this teardown. - this.widget.destroy(); for (const timer of this.timers) { timer.clear(); } + afterEach(this); }, }); |
