From 081b97c41dfa71f12a18390bd2fb5489253c84ff Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 14 Jun 2021 04:22:32 -0400 Subject: [PATCH] tests: Wrap more Mocha functions --- src/tests/frontend/runner.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/tests/frontend/runner.js b/src/tests/frontend/runner.js index 2784b508e..cc9d0315f 100644 --- a/src/tests/frontend/runner.js +++ b/src/tests/frontend/runner.js @@ -192,8 +192,21 @@ $(() => (async () => { // Per-module log of attempted Mocha function calls. Key is module path, value is an array of // [functionName, argsArray] arrays. const mochaCalls = new Map(); - const mochaFns = - ['describe', 'context', 'it', 'specify', 'before', 'after', 'beforeEach', 'afterEach']; + const mochaFns = [ + '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 = { define(...args) { if (args.length === 2) args = [{[args[0]]: args[1]}];