Skip to content

Commit cc42e10

Browse files
committed
fix: confit test error
1 parent 2ab59fd commit cc42e10

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/config.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let nuxt = null
66
// Init nuxt.js and create server listening on localhost:4000
77
test.before('Init Nuxt.js', async t => {
88
nuxt = createNuxt()
9-
nuxt.listen(4000, 'localhost')
9+
await nuxt.listen(3000, 'localhost')
1010
})
1111

1212
test('Vendor', async t => {
@@ -20,10 +20,10 @@ test('Vendor', async t => {
2020

2121
test('Plugin', async t => {
2222
const plugins = nuxt.options.plugins
23-
t.is(plugins[0], '@/plugins/i18n', 'i18n plugin added to config')
24-
t.is(plugins[1], '@/plugins/element-ui', 'element-ui plugin added to config')
25-
t.is(plugins[2].src, '@/plugins/clipboard', 'clipboard plugin added to config')
26-
t.is(plugins[3].src, '@/plugins/error-handler', 'error handler plugin added to config')
23+
t.is(plugins[1], '@/plugins/i18n', 'i18n plugin added to config')
24+
t.is(plugins[2], '@/plugins/element-ui', 'element-ui plugin added to config')
25+
t.is(plugins[3].src, '@/plugins/clipboard', 'clipboard plugin added to config')
26+
t.is(plugins[4].src, '@/plugins/error-handler', 'error handler plugin added to config')
2727
})
2828

2929
test('Modules', async t => {
@@ -41,6 +41,6 @@ test('Middleware', async t => {
4141
})
4242

4343
// Close server and ask nuxt to stop listening to file changes
44-
test.after('Closing server and nuxt.js', t => {
45-
nuxt.close()
44+
test.after('Closing server and nuxt.js', async t => {
45+
await nuxt.close()
4646
})

0 commit comments

Comments
 (0)