Skip to content

Commit af1d4aa

Browse files
Temporarily disable broken Windows test
1 parent ba10379 commit af1d4aa

File tree

2 files changed

+66
-62
lines changed

2 files changed

+66
-62
lines changed

integrations/postcss/index.test.ts

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'node:path'
2-
import { candidate, css, html, js, json, test, ts, yaml } from '../utils'
2+
import { candidate, css, html, IS_WINDOWS, js, json, test, ts, yaml } from '../utils'
33

44
test(
55
'production build (string)',
@@ -636,64 +636,67 @@ test(
636636
},
637637
)
638638

639-
test(
640-
'rebuild error recovery',
641-
{
642-
fs: {
643-
'package.json': json`
644-
{
645-
"devDependencies": {
646-
"postcss": "^8",
647-
"postcss-cli": "^10",
648-
"tailwindcss": "workspace:^",
649-
"@tailwindcss/postcss": "workspace:^"
639+
if (!IS_WINDOWS) {
640+
test(
641+
'rebuild error recovery',
642+
{
643+
fs: {
644+
'package.json': json`
645+
{
646+
"devDependencies": {
647+
"postcss": "^8",
648+
"postcss-cli": "^10",
649+
"tailwindcss": "workspace:^",
650+
"@tailwindcss/postcss": "workspace:^"
651+
}
650652
}
651-
}
652-
`,
653-
'postcss.config.js': js`
654-
module.exports = {
655-
plugins: {
656-
'@tailwindcss/postcss': {},
657-
},
658-
}
659-
`,
660-
'src/index.html': html`
653+
`,
654+
'postcss.config.js': js`
655+
module.exports = {
656+
plugins: {
657+
'@tailwindcss/postcss': {},
658+
},
659+
}
660+
`,
661+
'src/index.html': html`
661662
<div class="underline"></div>
662663
`,
663-
'src/index.css': css` @import './tailwind.css'; `,
664-
'src/tailwind.css': css`
665-
@reference 'tailwindcss/does-not-exist';
666-
@import 'tailwindcss/utilities';
667-
`,
664+
'src/index.css': css` @import './tailwind.css'; `,
665+
'src/tailwind.css': css`
666+
@reference 'tailwindcss/does-not-exist';
667+
@import 'tailwindcss/utilities';
668+
`,
669+
},
668670
},
669-
},
670-
async ({ fs, expect, spawn }) => {
671-
let process = await spawn('pnpm postcss src/index.css --output dist/out.css --watch --verbose')
671+
async ({ fs, expect, spawn }) => {
672+
let process = await spawn(
673+
'pnpm postcss src/index.css --output dist/out.css --watch --verbose',
674+
)
672675

673-
await process.onStderr((message) =>
674-
message.includes('does-not-exist is not exported from package'),
675-
)
676+
await process.onStderr((message) =>
677+
message.includes('does-not-exist is not exported from package'),
678+
)
676679

677-
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
680+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
678681
"
679682
--- dist/out.css ---
680683
<EMPTY>
681684
"
682685
`)
683686

684-
await process.onStderr((message) => message.includes('Waiting for file changes...'))
687+
await process.onStderr((message) => message.includes('Waiting for file changes...'))
685688

686-
// Fix the CSS file
687-
await fs.write(
688-
'src/tailwind.css',
689-
css`
690-
@reference 'tailwindcss/theme';
691-
@import 'tailwindcss/utilities';
692-
`,
693-
)
694-
await process.onStderr((message) => message.includes('Finished src/index.css'))
689+
// Fix the CSS file
690+
await fs.write(
691+
'src/tailwind.css',
692+
css`
693+
@reference 'tailwindcss/theme';
694+
@import 'tailwindcss/utilities';
695+
`,
696+
)
697+
await process.onStderr((message) => message.includes('Finished src/index.css'))
695698

696-
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
699+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
697700
"
698701
--- dist/out.css ---
699702
.underline {
@@ -702,24 +705,25 @@ test(
702705
"
703706
`)
704707

705-
// Now break the CSS file again
706-
await fs.write(
707-
'src/tailwind.css',
708-
css`
709-
@reference 'tailwindcss/does-not-exist';
710-
@import 'tailwindcss/utilities';
711-
`,
712-
)
713-
await process.onStderr((message) =>
714-
message.includes('does-not-exist is not exported from package'),
715-
)
716-
await process.onStderr((message) => message.includes('Finished src/index.css'))
717-
718-
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
708+
// Now break the CSS file again
709+
await fs.write(
710+
'src/tailwind.css',
711+
css`
712+
@reference 'tailwindcss/does-not-exist';
713+
@import 'tailwindcss/utilities';
714+
`,
715+
)
716+
await process.onStderr((message) =>
717+
message.includes('does-not-exist is not exported from package'),
718+
)
719+
await process.onStderr((message) => message.includes('Finished src/index.css'))
720+
721+
expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(`
719722
"
720723
--- dist/out.css ---
721724
<EMPTY>
722725
"
723726
`)
724-
},
725-
)
727+
},
728+
)
729+
}

integrations/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ interface TestFlags {
6464

6565
type SpawnActor = { predicate: (message: string) => boolean; resolve: () => void }
6666

67-
const IS_WINDOWS = platform() === 'win32'
67+
export const IS_WINDOWS = platform() === 'win32'
6868

6969
const TEST_TIMEOUT = IS_WINDOWS ? 120000 : 60000
7070
const ASSERTION_TIMEOUT = IS_WINDOWS ? 10000 : 5000

0 commit comments

Comments
 (0)