test: unsupported plugin

This commit is contained in:
Clark Du 2018-01-27 22:53:00 +08:00
parent f0a3791acb
commit 4811ddd6b9
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -58,6 +58,11 @@ test.serial('Deprecated: nuxt.plugin()', async t => {
t.true(nuxt.__builder_plugin) t.true(nuxt.__builder_plugin)
}) })
test.serial('Error: nuxt.plugin()', async t => {
const error = t.throws(() => nuxt.plugin('build:done', () => {}))
t.is(error.message, 'nuxt.plugin(\'build:done\',..) is not supported. Use new hooks system.')
})
// 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 and nuxt.js', async t => { test.after.always('Closing server and nuxt.js', async t => {
await nuxt.close() await nuxt.close()