test: add postcss custom feature test case

This commit is contained in:
Clark Du 2018-07-25 17:38:49 +01:00
parent a0ca257263
commit 241a071a3e
2 changed files with 12 additions and 2 deletions

View File

@ -40,7 +40,13 @@ describe('basic browser', () => {
await page.nuxt.navigate('/css')
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 () => {

View File

@ -36,7 +36,11 @@ export default {
build: {
scopeHoisting: true,
postcss: [
require('postcss-preset-env')()
require('postcss-preset-env')({
features: {
'custom-selectors': true
}
})
]
}
}