mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-19 23:21:09 +00:00
[tests] ensure global styles are inlined
This commit is contained in:
parent
6504b0666a
commit
98ffc2110b
3
test/fixtures/with-config/assets/app.css
vendored
Executable file
3
test/fixtures/with-config/assets/app.css
vendored
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
.global-css-selector {
|
||||||
|
color: red;
|
||||||
|
}
|
5
test/fixtures/with-config/nuxt.config.js
vendored
5
test/fixtures/with-config/nuxt.config.js
vendored
@ -31,5 +31,8 @@ module.exports = {
|
|||||||
extend (config, options) {
|
extend (config, options) {
|
||||||
config.devtool = 'nosources-source-map'
|
config.devtool = 'nosources-source-map'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
css: [
|
||||||
|
{src: '~/assets/app.css'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,11 @@ test('/', async t => {
|
|||||||
t.true(html.includes('<h1>I have custom configurations</h1>'))
|
t.true(html.includes('<h1>I have custom configurations</h1>'))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('/ (global styles inlined)', async t => {
|
||||||
|
const { html } = await nuxt.renderRoute('/')
|
||||||
|
t.true(html.includes('.global-css-selector'))
|
||||||
|
})
|
||||||
|
|
||||||
test('/ (custom app.html)', async t => {
|
test('/ (custom app.html)', async t => {
|
||||||
const { html } = await nuxt.renderRoute('/')
|
const { html } = await nuxt.renderRoute('/')
|
||||||
t.true(html.includes('<p>Made by Nuxt.js team</p>'))
|
t.true(html.includes('<p>Made by Nuxt.js team</p>'))
|
||||||
|
Loading…
Reference in New Issue
Block a user