Skip to content
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

fix: invalidate new worker and its dependencies (fix #1873) #1896

Merged
merged 4 commits into from
Aug 23, 2022

Conversation

sun0day
Copy link
Contributor

@sun0day sun0day commented Aug 22, 2022

Worker and its dependencies should be invalidated every time it is created so that Worker module and its dependencies will be injected into a new context on the next creation.

fix #1873

Before PR:

image

After PR:

image

Copy link
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add a test for this use case.

packages/web-worker/src/pure.ts Show resolved Hide resolved
@sun0day
Copy link
Contributor Author

sun0day commented Aug 23, 2022

Please, add a test for this use case.

Yeah, I will add some test cases later.

@sun0day
Copy link
Contributor Author

sun0day commented Aug 23, 2022

Please, add a test for this use case.

Done. @sheremet-va

@sheremet-va sheremet-va merged commit 88d5764 into vitest-dev:main Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't run two web worker test cases in one file
2 participants