mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
test: add tests for options.ingore
This commit is contained in:
parent
347fa3e9fd
commit
957bc26583
@ -173,6 +173,12 @@ test.serial('/-ignored', async t => {
|
|||||||
t.true(error.response.body.includes('Cannot GET /-ignored'))
|
t.true(error.response.body.includes('Cannot GET /-ignored'))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test.serial('/ignored.test', async t => {
|
||||||
|
const error = await t.throws(rp(url('/ignored.test')))
|
||||||
|
t.true(error.statusCode === 404)
|
||||||
|
t.true(error.response.body.includes('Cannot GET /ignored.test'))
|
||||||
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test.after.always('Closing server', async t => {
|
test.after.always('Closing server', async t => {
|
||||||
await server.close()
|
await server.close()
|
||||||
|
3
test/fixtures/basic/middleware/ignored.test.js
vendored
Normal file
3
test/fixtures/basic/middleware/ignored.test.js
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default function () {
|
||||||
|
throw new Error('Should be ignored')
|
||||||
|
}
|
13
test/fixtures/basic/pages/ignored.test.vue
vendored
Normal file
13
test/fixtures/basic/pages/ignored.test.vue
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<template lang="html">
|
||||||
|
<div class="error">
|
||||||
|
Should be ignored
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="css">
|
||||||
|
</style>
|
3
test/fixtures/basic/store/ignored.test.js
vendored
Normal file
3
test/fixtures/basic/store/ignored.test.js
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export const state = () => ({
|
||||||
|
error: 'Should be ignored'
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user