mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
tests: Don't attempt to wrap non-functions
This commit is contained in:
parent
081b97c41d
commit
5dcb7a7549
1 changed files with 1 additions and 0 deletions
|
@ -221,6 +221,7 @@ $(() => (async () => {
|
||||||
// backups might be placeholders, not the actual Mocha functions.
|
// backups might be placeholders, not the actual Mocha functions.
|
||||||
const backups = {};
|
const backups = {};
|
||||||
for (const fn of mochaFns) {
|
for (const fn of mochaFns) {
|
||||||
|
if (typeof window[fn] !== 'function') continue;
|
||||||
// Note: Test specs can require other modules, so window[fn] might be a placeholder
|
// Note: Test specs can require other modules, so window[fn] might be a placeholder
|
||||||
// function, not the actual Mocha function.
|
// function, not the actual Mocha function.
|
||||||
backups[fn] = window[fn];
|
backups[fn] = window[fn];
|
||||||
|
|
Loading…
Reference in a new issue