
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@kyleshockey/mocha-webpack
Advanced tools
@kyleshockey/mocha-webpack is a fork of mocha-webpack. Here's what you should know:
1.1.0, which is identical to mocha-webpack@1.1.0.mocha-webpack's 2.x development when it was abandoned was published as @kyleshockey/mocha-webpack@2.0.0.mocha test runner with integrated webpack precompiler
mocha-webpack is basically a wrapper around the following command...
$ webpack test.js output.js && mocha output.js
... but in a much more powerful & optimized way.

mocha-webpack ...
Benefits over plain mocha
--watch)Unlike mocha, mocha-webpack analyzes your dependency graph and run only those test files that were affected by this file change.
You'll get continuous feedback whenever you make changes as all tests that are related in any way to this change will be tested again. Isn't that awesome?
If any build errors happens, they will be shown like below

webpack@^4mocha@^4 and mocha@^5webpack@^2 & webpack@^3mocha@^2, mocha@^3, mocha@^4, and mocha@^5Install mocha-webpack via npm install
$ npm install webpack mocha mocha-webpack --save-dev
and use it via npm scripts in your package.json
Further installation and configuration instructions can be found in the installation chapter.
run a single test
mocha-webpack simple.test.js
run all tests by glob
mocha-webpack "test/**/*.js"
Note: You may noticed the quotes around the glob pattern. That's unfortunately necessary as most terminals will resolve globs automatically.
run all tests in directory "test" matching the file pattern *.test.js  (add --recursive to include subdirectories)
mocha-webpack --glob "*.test.js" test
Watch mode? just add --watch
mocha-webpack --watch test
MIT
FAQs
mocha cli with webpack support
The npm package @kyleshockey/mocha-webpack receives a total of 1 weekly downloads. As such, @kyleshockey/mocha-webpack popularity was classified as not popular.
We found that @kyleshockey/mocha-webpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.