-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sdk): script timeout #2433
Conversation
🦋 Changeset detectedLatest commit: 19d0306 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| HTMLScriptElement | ||
| { script?: HTMLScriptElement; timeout?: number } | ||
| void; | ||
|
||
export function createScript( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could add a unit test here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was struggling to find how to create a unit test in this case because timeout immediately throws error in simulation when remote is offline.
Do you have an idea of how to unit test this case?
Only on windows does it have the timeout problem so in browser its hard to reproduce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhoushaw tests added, i found dom.test.ts was not running at all so i have written a handful of new tests
# Conflicts: # packages/runtime/src/core.ts
Description
Allow timeout to be set on create script
Script timeout is OS based and on windows, it can take several seconds before errorLoadRemote hook can be triggered as OS waits for script
Related Issue
#2367
Types of changes
Checklist