@@ -6,7 +6,7 @@ let nuxt = null
66// Init nuxt.js and create server listening on localhost:4000
77test . before ( 'Init Nuxt.js' , async t => {
88 nuxt = createNuxt ( )
9- nuxt . listen ( 4000 , 'localhost' )
9+ await nuxt . listen ( 3000 , 'localhost' )
1010} )
1111
1212test ( 'Vendor' , async t => {
@@ -20,10 +20,10 @@ test('Vendor', async t => {
2020
2121test ( '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
2929test ( '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