mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +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')
|
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 => {
|
test('/stateful', async t => {
|
||||||
const { html } = await nuxt.renderRoute('/stateful')
|
const { html } = await nuxt.renderRoute('/stateful')
|
||||||
t.true(html.includes('<div><p>The answer is 42</p></div>'))
|
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,
|
bad: null,
|
||||||
'': true
|
'': 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>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@custom-selector :--red div.red;
|
||||||
|
:--red {
|
||||||
|
background-color: blue;
|
||||||
|
}
|
||||||
.red {
|
.red {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user