test: add tests for options.ingore

This commit is contained in:
Pooya Parsa 2018-01-15 13:20:42 +03:30
parent 347fa3e9fd
commit 957bc26583
4 changed files with 25 additions and 0 deletions

View File

@ -173,6 +173,12 @@ test.serial('/-ignored', async t => {
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
test.after.always('Closing server', async t => {
await server.close()

View File

@ -0,0 +1,3 @@
export default function () {
throw new Error('Should be ignored')
}

View File

@ -0,0 +1,13 @@
<template lang="html">
<div class="error">
Should be ignored
</div>
</template>
<script>
export default {
}
</script>
<style lang="css">
</style>

View File

@ -0,0 +1,3 @@
export const state = () => ({
error: 'Should be ignored'
})