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

test: harden partialAccept test #441

Merged

Conversation

rixo
Copy link
Collaborator

@rixo rixo commented Sep 17, 2022

Adding these assertions ensure that the test is not passing by updating too eagerly. For example, with old svelte-hmr option acceptNamedExports:false, the current test would pass, but the hardened version would not.

We only want the actual consumers of the named exports to be impacted by the HMR bubble. Consumers of only the default export (i.e. the component) should not be impacted, because the default export is accepted by the component itself.

@dominikg dominikg merged commit 223ebdd into sveltejs:fix/context-module-hmr Sep 17, 2022
dominikg added a commit that referenced this pull request Sep 17, 2022
* fix: update svelte-hmr and enable partial accept to allow context=module updates, see issue #134

* test: harden partialAccept test (#441)

* refactor: improve test logic to avoid jest syntax from hell

Co-authored-by: rixo <rixo@rixo.fr>
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.

None yet

2 participants