Skip to content

Commit 1645849

Browse files
Fix Windows CI
1 parent 62ca1ec commit 1645849

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

integrations/postcss/index.test.ts

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os from 'node:os'
12
import path from 'node:path'
23
import { candidate, css, html, js, json, test, ts, yaml } from '../utils'
34

@@ -674,12 +675,19 @@ test(
674675
message.includes('does-not-exist is not exported from package'),
675676
)
676677

677-
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
678-
"
679-
--- dist/out.css ---
680-
<EMPTY>
681-
"
682-
`)
678+
if (os.platform() === 'win32') {
679+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
680+
"
681+
"
682+
`)
683+
} else {
684+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
685+
"
686+
--- dist/out.css ---
687+
<EMPTY>
688+
"
689+
`)
690+
}
683691

684692
await process.onStderr((message) => message.includes('Waiting for file changes...'))
685693

@@ -715,11 +723,18 @@ test(
715723
)
716724
await process.onStderr((message) => message.includes('Finished src/index.css'))
717725

718-
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
719-
"
720-
--- dist/out.css ---
721-
<EMPTY>
722-
"
723-
`)
726+
if (os.platform() === 'win32') {
727+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
728+
"
729+
"
730+
`)
731+
} else {
732+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
733+
"
734+
--- dist/out.css ---
735+
<EMPTY>
736+
"
737+
`)
738+
}
724739
},
725740
)

0 commit comments

Comments
 (0)