Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
instant-mocha
Advanced tools
Readme
Build tests with Webpack and run them with Mocha in one command
How does it compare to mocha-webpack / mochapack? Answered in the FAQ.
Support this project by ⭐️ starring and sharing it. Follow me to see what other cool projects I'm working on! ❤️
npm i -D mocha webpack instant-mocha
Note: webpack
and mocha
are peer-dependencies so you can provide any version
instant-mocha [test paths/globs...]
You can either use npx
(eg. npx instant-mocha ...
) or add it to package.json
scripts (eg. npm test
) to invoke it.
Watch mode. Re-compiles the Webpack build and re-run tests on file-changes.
Default: webpack.config.js
Path to the Webpack config.
For more info, run:
instant-mocha --help
instant-mocha ---webpack-config webpack.config.js --require setup.js 'tests/*.spec.js'
webpack.config.js
setup.js
. Note, this is not apart of the build and is loaded directly from Node.jstests/*.spec.js
Set devtool: 'source-map'
in your Webpack config.
Add webpackbar to your Webpack config.
node_modules
automatically externalized?They can't be automatically externalized because it's possible some dependencies require bundling or pre-processing. For example, packages in ESM format or deep-dependencies that are stubbed for testing.
It's recommended to externalize what you can in your Webpack config to speed up the build though. Consider using webpack-node-externals
to do this.
First of all, major thanks to mocha-webpack for the original implementation and serving the community.
This project was created from scratch because mocha-webpack
is no longer maintained and doesn't have Webpack 5 support.
Some notable improvements include:
mocha-webpack
uses Flow.mocha-webpack
returns the number of failed tests as the exit code. instant-mocha only uses exit code 1
for any test failures as per Bash convention.MIT © Hiroki Osame
Logo made by monkik
FAQs
Build tests with Webpack and run them with Mocha in one command
The npm package instant-mocha receives a total of 2,097 weekly downloads. As such, instant-mocha popularity was classified as popular.
We found that instant-mocha demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.