test: fix run css playground with legacy sass#18946
Conversation
bluwy
left a comment
There was a problem hiding this comment.
I'm not really sure about expectToBeEither, it feels like it could make tests harder to debug if it fails 🤔 Should the HMR tests do cleanup instead so it returns to original? Are the tests also running serially too?
The tests ( |
Does adding vite/playground/vitestGlobalSetup.ts Lines 44 to 47 in c28df71 |
|
Oh, I wasn't aware of that! Let me try that. |
|
Yep, it works 👍 |
Description
Built on top of #18945Since #18636, the legacy sass tests for playground/css was not run because
playground/css/__tests__/sass-legacy/sass-legacy.spec.tswas missing. This PR adds that.Also this PR extracts sass related tests in a different file to skip running other tests for
sass-legacy.spec.tsandsass-modern.spec.ts.old description
Also this PR does the following changes to reduce flaky fails.
css.spec.tscss.spec.tsandsass-modern.spec.tsandsass-legacy.spec.tstries to change the file and fails sometimes.css.spec.tschanges the file and other tests observes the changed file.sass-*.spec.tsexpectToBeEitherand also to reduce duplicated test runs.