Fix main.test.ts (#1320)

This commit is contained in:
Hood Chatham
2023-03-30 10:52:39 -07:00
committed by GitHub
parent 146afb6532
commit b61e8435d1
3 changed files with 12 additions and 13 deletions

View File

@@ -436,6 +436,10 @@ globalExport('pyscript_get_config', pyscript_get_config);
// main entry point of execution
const globalApp = new PyScriptApp();
globalApp.readyPromise = globalApp.main();
// This top level execution causes trouble in jest
if (typeof jest === 'undefined') {
globalApp.readyPromise = globalApp.main();
}
export { version };