Files
Tim NeutkensandGitHub 59bda2d818 More Turbopack fixes (#56299)
Skips additional production-only tests.

Follow-up to #56089.

In this PR I went through all of `test/integration` looking for `nextBuild(` and added the skipping logic.
2023-10-02 13:55:23 +00:00

41 lines
849 B
TypeScript

import postcss from 'postcss'
import mod from './plugin'
import css from '../noop-template'
describe('cssnano accepts plugin configuration', () => {
test('should not remove all comments', async () => {
const input = css`
p {
/*! heading */
color: yellow;
}
`
const res = await postcss([mod({ discardComments: {} })]).process(input, {
from: 'input.css',
to: 'output.css',
})
expect(res.css).not.toBe('p{color:#ff0}')
})
test('should remove all comments', async () => {
const input = css`
p {
/*! heading */
color: yellow;
}
`
const res = await postcss([
mod({ discardComments: { removeAll: true } }),
]).process(input, {
from: 'input.css',
to: 'output.css',
})
expect(res.css).toBe('p{color:#ff0}')
})
})