Browse Source

fix: MessageChannel hangs in node tests

tophf 3 years ago
parent
commit
b15315da5d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      test/mock/polyfill.js

+ 1 - 0
test/mock/polyfill.js

@@ -33,6 +33,7 @@ for (const k of Object.keys(domProps)) {
   }
 }
 Object.defineProperties(global, domProps);
+delete MessagePort.prototype.onmessage; // to avoid hanging
 global.__VAULT_ID__ = false;
 Object.assign(global, require('#/common/safe-globals'));
 Object.assign(global, require('#/injected/safe-globals-injected'));