tests: Wrap more Mocha functions
This commit is contained in:
parent
3e4df68510
commit
081b97c41d
1 changed files with 15 additions and 2 deletions
|
@ -192,8 +192,21 @@ $(() => (async () => {
|
||||||
// Per-module log of attempted Mocha function calls. Key is module path, value is an array of
|
// Per-module log of attempted Mocha function calls. Key is module path, value is an array of
|
||||||
// [functionName, argsArray] arrays.
|
// [functionName, argsArray] arrays.
|
||||||
const mochaCalls = new Map();
|
const mochaCalls = new Map();
|
||||||
const mochaFns =
|
const mochaFns = [
|
||||||
['describe', 'context', 'it', 'specify', 'before', 'after', 'beforeEach', 'afterEach'];
|
'after',
|
||||||
|
'afterEach',
|
||||||
|
'before',
|
||||||
|
'beforeEach',
|
||||||
|
'context',
|
||||||
|
'describe',
|
||||||
|
'it',
|
||||||
|
'run',
|
||||||
|
'specify',
|
||||||
|
'xcontext', // Undocumented as of Mocha 7.1.2.
|
||||||
|
'xdescribe', // Undocumented as of Mocha 7.1.2.
|
||||||
|
'xit', // Undocumented as of Mocha 7.1.2.
|
||||||
|
'xspecify', // Undocumented as of Mocha 7.1.2.
|
||||||
|
];
|
||||||
window.testRunnerRequire = {
|
window.testRunnerRequire = {
|
||||||
define(...args) {
|
define(...args) {
|
||||||
if (args.length === 2) args = [{[args[0]]: args[1]}];
|
if (args.length === 2) args = [{[args[0]]: args[1]}];
|
||||||
|
|
Loading…
Reference in a new issue