diff options
Diffstat (limited to 'addons/web/static/tests/helpers/test_utils_mock.js')
| -rw-r--r-- | addons/web/static/tests/helpers/test_utils_mock.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web/static/tests/helpers/test_utils_mock.js b/addons/web/static/tests/helpers/test_utils_mock.js index 3eaaae0a46f..ad7878001f3 100644 --- a/addons/web/static/tests/helpers/test_utils_mock.js +++ b/addons/web/static/tests/helpers/test_utils_mock.js @@ -198,6 +198,11 @@ function addMockEnvironment(widget, params) { // widget is destroyed, at the end of each test to avoid collisions core.bus.trigger('clear_cache'); + _(services).chain() + .compact() // services can be defined but null (e.g. ajax) + .reject(function (s) { return s.isDestroyed(); }) + .invoke('destroy'); + DebouncedField.prototype.DEBOUNCE = initialDebounceValue; dom.DEBOUNCE = initialDOMDebounceValue; if (params.debounce === false) { |
