-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: run flaky tests on GitHub action #4902
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for fastidious-cascaron-4ded94 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
2ea952c
to
4099a4d
Compare
4099a4d
to
c65d0b3
Compare
// TODO: Fix flakiness and enable on CI | ||
if (process.env.GITHUB_ACTIONS) | ||
test.only('skip tests on CI', () => {}) | ||
|
||
test('editing source file triggers re-run', async () => { |
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 the flakiness in files that rely on watch mode might be due to the watcher incorrectly emitting ready event too soon. You can try incorporating the utility I wrote for Vite tests from here: https://github.com/sheremet-va/vite/blob/4df5ac29087f448a40f80707dec78d197e74c6d2/playground/hmr-ssr/__tests__/hmr.spec.ts#L960
We already check for a ready event with an env variable for tests (maybe it can be improved with the utility here):
if (process.env.VITE_TEST_WATCHER_DEBUG) { |
if (options.watch && process.env.VITE_TEST_WATCHER_DEBUG) { |
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.
Thank you for your advice!
I will check it out!
Description
Woriking in Progress.
Trying to address #4464
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.