mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
test: add postcss custom feature test case
This commit is contained in:
parent
a0ca257263
commit
241a071a3e
@ -40,7 +40,13 @@ describe('basic browser', () => {
|
|||||||
await page.nuxt.navigate('/css')
|
await page.nuxt.navigate('/css')
|
||||||
|
|
||||||
expect(await page.$text('.red')).toBe('This is red')
|
expect(await page.$text('.red')).toBe('This is red')
|
||||||
expect(await page.$eval('.red', red => window.getComputedStyle(red).color)).toBe('rgb(255, 0, 0)')
|
expect(await page.$eval('.red', red => {
|
||||||
|
const { color, backgroundColor } = window.getComputedStyle(red)
|
||||||
|
return { color, backgroundColor }
|
||||||
|
})).toEqual({
|
||||||
|
color: 'rgb(255, 0, 0)',
|
||||||
|
backgroundColor: 'rgb(0, 0, 255)'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test.skip('/stateful', async () => {
|
test.skip('/stateful', async () => {
|
||||||
|
6
test/fixtures/basic/nuxt.config.js
vendored
6
test/fixtures/basic/nuxt.config.js
vendored
@ -36,7 +36,11 @@ export default {
|
|||||||
build: {
|
build: {
|
||||||
scopeHoisting: true,
|
scopeHoisting: true,
|
||||||
postcss: [
|
postcss: [
|
||||||
require('postcss-preset-env')()
|
require('postcss-preset-env')({
|
||||||
|
features: {
|
||||||
|
'custom-selectors': true
|
||||||
|
}
|
||||||
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user