Skip to content

Commit 61429d0

Browse files
Add the same workaround for postcss esm
1 parent 3666a98 commit 61429d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

integrations/postcss/config.test.ts

+8
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ test(
226226
'color: blue',
227227
])
228228

229+
// While working on this test we noticed that it was failing in about 1-2%
230+
// of the runs. We tracked this down to being a proper reset of ESM imports
231+
// for the `my-color.js` file but for some reason reading it will result in
232+
// the previous contents.
233+
//
234+
// To work around this, we give postcss some time to stabilize.
235+
await new Promise((resolve) => setTimeout(resolve, 500))
236+
229237
await fs.write('my-color.mjs', js`export default 'red'`)
230238

231239
await fs.expectFileToContain('dist/out.css', [

0 commit comments

Comments
 (0)