diff --git a/test/fixtures/module/modules/basic/index.js b/test/fixtures/module/modules/basic/index.js index 2604ae1327..864007865b 100755 --- a/test/fixtures/module/modules/basic/index.js +++ b/test/fixtures/module/modules/basic/index.js @@ -23,8 +23,8 @@ module.exports = function basicModule (options, resolve) { }) // Require same module twice - this.requireModule('@/modules/empty/index.js') - this.requireModule('@/modules/empty/index.js') + this.requireModule('~/modules/empty/index.js') + this.requireModule('~/modules/empty/index.js') resolve() } diff --git a/test/fixtures/module/modules/middleware/index.js b/test/fixtures/module/modules/middleware/index.js index d97c71cbef..4fee13ae84 100755 --- a/test/fixtures/module/modules/middleware/index.js +++ b/test/fixtures/module/modules/middleware/index.js @@ -1,4 +1,3 @@ - module.exports = function middlewareModule (options) { return new Promise((resolve, reject) => { // Add /api endpoint @@ -9,14 +8,14 @@ module.exports = function middlewareModule (options) { } }) // Add local middleware js - this.addServerMiddleware('@modules/middleware/log.js') + this.addServerMiddleware('~/modules/middleware/log.js') // Add plain middleware this.addServerMiddleware((req, res, next) => { res.setHeader('x-nuxt', 'hello') next() }) // Add file middleware - this.addServerMiddleware('@modules/middleware/midd1') + this.addServerMiddleware('~/modules/middleware/midd1') resolve() }) } diff --git a/test/fixtures/module/modules/middleware/midd1.js b/test/fixtures/module/modules/middleware/midd1.js index 4c109b5637..78ec0d0355 100644 --- a/test/fixtures/module/modules/middleware/midd1.js +++ b/test/fixtures/module/modules/middleware/midd1.js @@ -1,4 +1,4 @@ module.exports = function (req, res, next) { - res.setHeader('x-midd-1', 'ok') - next() -} \ No newline at end of file + res.setHeader('x-midd-1', 'ok') + next() +} diff --git a/test/fixtures/module/modules/middleware/midd2.js b/test/fixtures/module/modules/middleware/midd2.js index 95ae3940dc..64babff282 100644 --- a/test/fixtures/module/modules/middleware/midd2.js +++ b/test/fixtures/module/modules/middleware/midd2.js @@ -1,4 +1,4 @@ module.exports = function (req, res, next) { - res.setHeader('x-midd-2', 'ok') - next() -} \ No newline at end of file + res.setHeader('x-midd-2', 'ok') + next() +} diff --git a/test/fixtures/module/nuxt.config.js b/test/fixtures/module/nuxt.config.js index 78090df4ee..26f1351403 100755 --- a/test/fixtures/module/nuxt.config.js +++ b/test/fixtures/module/nuxt.config.js @@ -1,9 +1,9 @@ module.exports = { loading: true, modules: [ - '~modules/basic', // Use ~ for deprication warning coverage + '~/modules/basic', // Use ~ for deprication warning coverage { - src: '@/modules/middleware', + src: '~/modules/middleware', options: { foo: 'bar' } diff --git a/test/fixtures/module/router.js b/test/fixtures/module/router.js index 810cb67757..6fe636aeab 100644 --- a/test/fixtures/module/router.js +++ b/test/fixtures/module/router.js @@ -9,12 +9,12 @@ export function createRouter () { routes: [ { path: '/', - component: require('~/views/index.vue'), + component: require('~/views/index.vue').default, name: 'index' }, { path: '/about', - component: require('~/views/about.vue'), + component: require('~/views/about.vue').default, name: 'about' } ] diff --git a/test/fixtures/with-config/nuxt.config.js b/test/fixtures/with-config/nuxt.config.js index cfff7aaa2e..339e770469 100644 --- a/test/fixtures/with-config/nuxt.config.js +++ b/test/fixtures/with-config/nuxt.config.js @@ -7,17 +7,17 @@ module.exports = { routes.push({ name: 'about-bis', path: '/about-bis', - component: '@pages/about.vue' + component: '~/pages/about.vue' }) } }, transition: 'test', offline: true, plugins: [ - '~plugins/test.js', // Use ~ for deprication warning coverage - { src: '@plugins/only-client.js', ssr: false } + '~/plugins/test.js', // Use ~ for deprication warning coverage + { src: '~/plugins/only-client.js', ssr: false } ], - loading: '@components/loading', + loading: '~/components/loading', env: { bool: true, num: 23, @@ -35,7 +35,7 @@ module.exports = { } }, css: [ - { src: '@assets/app.css' } + { src: '~/assets/app.css' } ], render: { http2: {