mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
test: custom postcss config
This commit is contained in:
parent
17caac59e2
commit
162b56ee4e
1
test/fixtures/with-config/nuxt.config.js
vendored
1
test/fixtures/with-config/nuxt.config.js
vendored
@ -19,6 +19,7 @@ module.exports = {
|
||||
modulesDir: path.join(__dirname, '..', '..', '..', 'node_modules'),
|
||||
transition: 'test',
|
||||
layoutTransition: 'test',
|
||||
loadingIndicator: 'circle',
|
||||
offline: true,
|
||||
plugins: [
|
||||
'~/plugins/test.js',
|
||||
|
6
test/fixtures/with-config/pages/index.vue
vendored
6
test/fixtures/with-config/pages/index.vue
vendored
@ -4,3 +4,9 @@
|
||||
<nuxt-link to="/about">About page</nuxt-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
::placeholder {
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
|
17
test/fixtures/with-config/postcss.config.js
vendored
Normal file
17
test/fixtures/with-config/postcss.config.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
const path = require('path')
|
||||
const modulesDir = path.join(__dirname, '..', '..', '..', 'node_modules')
|
||||
const rootDir = __dirname
|
||||
|
||||
module.exports = {
|
||||
plugins: {
|
||||
'postcss-import': {
|
||||
root: rootDir,
|
||||
path: [
|
||||
rootDir,
|
||||
modulesDir
|
||||
]
|
||||
},
|
||||
'postcss-url': {},
|
||||
'postcss-cssnext': {}
|
||||
}
|
||||
}
|
@ -44,6 +44,11 @@ test('/ (custom build.publicPath)', async t => {
|
||||
t.true(html.includes('src="/test/orion/vendor.'))
|
||||
})
|
||||
|
||||
test('/ (custom postcss.config.js)', async t => {
|
||||
const { html } = await nuxt.renderRoute('/')
|
||||
t.true(html.includes('::-webkit-input-placeholder'))
|
||||
})
|
||||
|
||||
test('/test/ (router base)', async t => {
|
||||
const window = await nuxt.renderAndGetWindow(url('/test/'))
|
||||
const html = window.document.body.innerHTML
|
||||
|
Loading…
Reference in New Issue
Block a user