Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add failing test
  • Loading branch information
RobinMalfait committed Jan 30, 2025
commit 479f5d5770bb85e737301e1b2880988249762a5e
27 changes: 27 additions & 0 deletions packages/@tailwindcss-postcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,33 @@ test('bail early when Tailwind is not used', async () => {
`)
})

test('handle CSS when only using a `@reference` (we should not bail early)', async () => {
let processor = postcss([
tailwindcss({ base: `${__dirname}/fixtures/example-project`, optimize: { minify: false } }),
])

let result = await processor.process(
css`
@reference "tailwindcss/theme.css";

foo {
@variant md {
bar: baz;
}
}
`,
{ from: inputCssFilePath() },
)

expect(result.css.trim()).toMatchInlineSnapshot(`
"@media (width >= 48rem) {
foo {
bar: baz;
}
}"
`)
})

test('runs `Once` plugins in the right order', async () => {
let before = ''
let after = ''
Expand Down