Wassup mates,
I am currently learning about the test components of php/webpack.
I have installed the Mochapack Fork, because the originial caused issues for no reasons (chunk error or something similar => npm run dev).
However, I did a fresh npm installation & achieved to use npm test with the named package installed.
Here is the actual issue: Now I wanna use the 'test' option of mochapack to test an Example .vue file for its propriety.
To use it in combination with laravel mix, I have to set the path to laravel's webpack.config.js and my testing files exactly and updated my package.json
Now everytime I type npm run test, I get an error telling me '(...) no test specified'
What did I do wrong?
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"test:": "mochapack --webpack-config=node_modules/laravel-mix/setup/webpack.config.js --require tests/JavaScript/setup.js tests/JavaScript/**/*.spec.js"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.1.0",
"cross-env": "^5.1",
"expect": "^24.8.0",
"jquery": "^3.2",
"jsdom": "^15.1.1",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"mocha": "^6.2.0",
"mochapack": "^1.1.2",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10",
"vue-test-utils": "^1.0.0-beta.11",
"webpack": "^4.20.2",
"webpack-cli": "^3.3.6",
"webpack-dev-middleware": "^3.7.0",
"webpack-dev-server": "^3.7.2",
"webpack-hot-middleware": "^2.25.0"
}
}
Aucun commentaire:
Enregistrer un commentaire