mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
test: inline postcss config
This commit is contained in:
parent
162b56ee4e
commit
9bf73b0b5a
@ -43,6 +43,12 @@ test('/css', async t => {
|
||||
t.is(window.getComputedStyle(element).color, 'red')
|
||||
})
|
||||
|
||||
test('/postcss', async t => {
|
||||
const window = await nuxt.renderAndGetWindow(url('/css'))
|
||||
const element = window.document.querySelector('div.red')
|
||||
t.is(window.getComputedStyle(element)['background-color'], 'blue')
|
||||
})
|
||||
|
||||
test('/stateful', async t => {
|
||||
const { html } = await nuxt.renderRoute('/stateful')
|
||||
t.true(html.includes('<div><p>The answer is 42</p></div>'))
|
||||
|
7
test/fixtures/basic/nuxt.config.js
vendored
7
test/fixtures/basic/nuxt.config.js
vendored
@ -15,5 +15,10 @@ module.exports = {
|
||||
bad: null,
|
||||
'': true
|
||||
},
|
||||
transition: false
|
||||
transition: false,
|
||||
build: {
|
||||
postcss: [
|
||||
require('postcss-cssnext')()
|
||||
]
|
||||
}
|
||||
}
|
||||
|
4
test/fixtures/basic/pages/css.vue
vendored
4
test/fixtures/basic/pages/css.vue
vendored
@ -3,6 +3,10 @@
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@custom-selector :--red div.red;
|
||||
:--red {
|
||||
background-color: blue;
|
||||
}
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user