You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since vitest ver 1.5.1 or there abouts, our browser tests have begun failing in CI with this error TypeError: Failed to fetch dynamically imported module:[some test file from within our monorepo test suites] and the module referenced is always one of the test files in our test suite. When run locally, all of the browser test suites run just fine.
Background:
In our CI workflow, Github Actions runs the browser test suite for each package in our monorepo sequentially. We have one general vitest.config that some packages extend with additional test exclusions (e.g. where a particular test script requires file system access that isn't available in the browser) but they all generally follow this same vitest configuration.
I have tried changing all of the various vitest concurrency and parallelism settings but to the same end result where our browser tests fail with some test file not being able to be loaded, this CI run being a good example. In this example, it's the tx package where the failure occurs but if I change something (e.g. exclude the specific test file where the import failure occurs), it will fail on a different file (often in the same package but sometimes elsewhere as demonstrated by this subsequent run where I skipped the offending test file from the previous run).
I'm kind of at a loss as to what could be the issue though it seems like some sort of race condition at the intersection of with whatever component in vitest loads the individual test files and the Github Actions environment.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Since
vitest
ver 1.5.1 or there abouts, our browser tests have begun failing in CI with this errorTypeError: Failed to fetch dynamically imported module:[some test file from within our monorepo test suites]
and the module referenced is always one of the test files in our test suite. When run locally, all of the browser test suites run just fine.Background:
In our CI workflow, Github Actions runs the browser test suite for each package in our monorepo sequentially. We have one general
vitest.config
that some packages extend with additional test exclusions (e.g. where a particular test script requires file system access that isn't available in the browser) but they all generally follow this same vitest configuration.I have tried changing all of the various vitest concurrency and parallelism settings but to the same end result where our browser tests fail with some test file not being able to be loaded, this CI run being a good example. In this example, it's the
tx
package where the failure occurs but if I change something (e.g. exclude the specific test file where the import failure occurs), it will fail on a different file (often in the same package but sometimes elsewhere as demonstrated by this subsequent run where I skipped the offending test file from the previous run).I'm kind of at a loss as to what could be the issue though it seems like some sort of race condition at the intersection of with whatever component in vitest loads the individual test files and the Github Actions environment.
Beta Was this translation helpful? Give feedback.
All reactions