From ef88b8e40850f5dcce05b62e1d8d8b9e82bcc0d7 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 1 Mar 2019 15:24:08 +0100 Subject: [PATCH] [IMP] web: qunit: add hook at end of each test This hook will be used to check that there are no leftovers in the DOM. --- addons/web/static/lib/qunit/qunit-2.9.1.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/lib/qunit/qunit-2.9.1.js b/addons/web/static/lib/qunit/qunit-2.9.1.js index ddc5a537a1d..3aeaea8c4ea 100644 --- a/addons/web/static/lib/qunit/qunit-2.9.1.js +++ b/addons/web/static/lib/qunit/qunit-2.9.1.js @@ -1247,6 +1247,7 @@ var LISTENERS = Object.create(null); var SUPPORTED_EVENTS = ["runStart", "suiteStart", "testStart", "assertion", "testEnd", "suiteEnd", "runEnd"]; + SUPPORTED_EVENTS.push("OdooAfterTestHook"); // Odoo customization /** * Emits an event with the specified data to all currently registered listeners. @@ -3140,6 +3141,8 @@ this.pushFailure("Expected at least one assertion, but none were run - call " + "expect(0) to accept zero assertions.", this.stack); } + emit("OdooAfterTestHook"); // Odoo customization + var i, module = this.module, moduleName = module.name,