mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
tests: Fix handling of nullish module definitions
This commit is contained in:
parent
9987834b15
commit
c8e544ec8d
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ $(() => (async () => {
|
||||||
const [origDefs] = args;
|
const [origDefs] = args;
|
||||||
const defs = {};
|
const defs = {};
|
||||||
for (const [path, origDef] of Object.entries(origDefs)) {
|
for (const [path, origDef] of Object.entries(origDefs)) {
|
||||||
defs[path] = function (require, exports, module) {
|
defs[path] = origDef == null ? origDef : function (require, exports, module) {
|
||||||
const calls = [];
|
const calls = [];
|
||||||
mochaCalls.set(module.id.replace(/\.js$/, ''), calls);
|
mochaCalls.set(module.id.replace(/\.js$/, ''), calls);
|
||||||
// Backup Mocha functions. Note that because modules can require other modules, these
|
// Backup Mocha functions. Note that because modules can require other modules, these
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue