[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.
This commit is contained in:
Aaron Bohy
2019-03-06 19:53:21 +01:00
parent aa24779cfa
commit ef88b8e408
@@ -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,