diff --git a/integrations/postcss/index.test.ts b/integrations/postcss/index.test.ts index e98ed40d82bb..7a263ba92d51 100644 --- a/integrations/postcss/index.test.ts +++ b/integrations/postcss/index.test.ts @@ -1,5 +1,5 @@ import path from 'node:path' -import { candidate, css, html, IS_WINDOWS, js, json, test, ts, yaml } from '../utils' +import { candidate, css, html, js, json, retryAssertion, test, ts, yaml } from '../utils' test( 'production build (string)', @@ -636,67 +636,59 @@ test( }, ) -if (!IS_WINDOWS) { - test( - 'rebuild error recovery', - { - fs: { - 'package.json': json` - { - "devDependencies": { - "postcss": "^8", - "postcss-cli": "^10", - "tailwindcss": "workspace:^", - "@tailwindcss/postcss": "workspace:^" - } - } - `, - 'postcss.config.js': js` - module.exports = { - plugins: { - '@tailwindcss/postcss': {}, - }, +test( + 'rebuild error recovery', + { + fs: { + 'package.json': json` + { + "devDependencies": { + "postcss": "^8", + "postcss-cli": "^10", + "tailwindcss": "workspace:^", + "@tailwindcss/postcss": "workspace:^" } - `, - 'src/index.html': html` + } + `, + 'postcss.config.js': js` + module.exports = { + plugins: { + '@tailwindcss/postcss': {}, + }, + } + `, + 'src/index.html': html`
`, - 'src/index.css': css` @import './tailwind.css'; `, - 'src/tailwind.css': css` - @reference 'tailwindcss/does-not-exist'; - @import 'tailwindcss/utilities'; - `, - }, + 'src/index.css': css` @import './tailwind.css'; `, + 'src/tailwind.css': css` + @reference 'tailwindcss/does-not-exist'; + @import 'tailwindcss/utilities'; + `, }, - async ({ fs, expect, spawn }) => { - let process = await spawn( - 'pnpm postcss src/index.css --output dist/out.css --watch --verbose', - ) + }, + async ({ fs, expect, spawn }) => { + let process = await spawn('pnpm postcss src/index.css --output dist/out.css --watch --verbose') - await process.onStderr((message) => - message.includes('does-not-exist is not exported from package'), - ) + await process.onStderr((message) => + message.includes('does-not-exist is not exported from package'), + ) - expect(await fs.dumpFiles('dist/*.css')).toMatchInlineSnapshot(` - " - --- dist/out.css --- -