You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ npm run mocha-webpack -- test\public-js\vue\left-menu\components\list-item-test.js
WEBPACK Compiled successfully in 1759ms
MOCHA Testing...
RUNTIME EXCEPTION Exception occurred while loading your tests
Error: Cannot find module '> webapp\output\assets\js\server-bundle.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function._resolveFilename (> webapp\node_modules\mocha-webpack\lib\util\registerRequireHook.js:44:34)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at > webapp\node_modules\mocha\lib\mocha.js:250:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (> webapp\node_modules\mocha\lib\mocha.js:247:14)
at Mocha.run (> webapp\node_modules\mocha\lib\mocha.js:576:10)
at > webapp\node_modules\mocha-webpack\lib\runner\TestRunner.js:191:27
at > webapp\node_modules\mocha-webpack\lib\webpack\compiler\registerReadyCallback.js:26:7
at AsyncSeriesHook.eval [as callAsync] (eval at create (> webapp\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:27:1)
at AsyncSeriesHook.lazyCompileHook (> webapp\node_modules\tapable\lib\Hook.js:154:20)
at emitRecords.err (> webapp\node_modules\webpack\lib\Compiler.js:267:22)
at Compiler.emitRecords (> webapp\node_modules\webpack\lib\Compiler.js:449:39)
at emitAssets.err (> webapp\node_modules\webpack\lib\Compiler.js:261:10)
at hooks.afterEmit.callAsync.err (> webapp\node_modules\webpack\lib\Compiler.js:435:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (> webapp\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:9:1)
at AsyncSeriesHook.lazyCompileHook (> webapp\node_modules\tapable\lib\Hook.js:154:20)
at asyncLib.forEachLimit.err (> webapp\node_modules\webpack\lib\Compiler.js:432:27)
at > webapp\node_modules\neo-async\async.js:2813:7
at done (> webapp\node_modules\neo-async\async.js:3521:9)
at MemoryFileSystem.writeFile (> webapp\node_modules\memory-fs\lib\MemoryFileSystem.js:328:9)
at writeOut (> webapp\node_modules\webpack\lib\Compiler.js:415:30)
at asyncLib.forEachLimit (> webapp\node_modules\webpack\lib\Compiler.js:426:7)
at objectIteratorWithKey (> webapp\node_modules\neo-async\async.js:3508:9)
at timesSync (> webapp\node_modules\neo-async\async.js:2292:7)
at Object.eachLimit (> webapp\node_modules\neo-async\async.js:3463:5)
at emitFiles (> webapp\node_modules\webpack\lib\Compiler.js:321:13)
at Immediate._onImmediate (> webapp\node_modules\memory-fs\lib\MemoryFileSystem.js:288:4)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
webpack@4.29.0
mocha-webpack@2.0.0-beta.0
I was getting this error when running
mocha-webpack
->Error: Cannot find module '> webapp\output\assets\js\server-bundle.js'
I was trying to re-use the server-side rendering Vue webpack config in testing, https://gitlab.com/gitlab-org/gitter/webapp/blob/49cc5b37f6691e500dcb23b9dc57fd338ef1a02d/public/js/webpack.server.config.js
But the problem is
plugins: [new VueSSRServerPlugin()]
which turns the entire output of the server build into a single JSON file.I solved this by just creating a separate test config without that plugin. Following along with https://vue-test-utils.vuejs.org/guides/testing-single-file-components-with-mocha-webpack.html
https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1360
The text was updated successfully, but these errors were encountered: