tests: Don't attempt to wrap non-functions

fix-flaky-adminsettings-test
Richard Hansen 2021-06-14 04:22:46 -04:00 committed by webzwo0i
parent 081b97c41d
commit 5dcb7a7549
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ $(() => (async () => {
// backups might be placeholders, not the actual Mocha functions.
const backups = {};
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
// function, not the actual Mocha function.
backups[fn] = window[fn];