![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
mocha-webpack
Advanced tools
Precompiles your server-side webpack bundles before running mocha. Inspired by karma-webpack alternatives usage, but this is for NodeJS!
Looking for a test runner for the browser? Use karma-webpack instead.
Work in progress...
mocha-webpack --webpack-config webpack.config-test.js --watch --colors test_index.js
// webpack.config-test.js
var nodeExternals = require('webpack-node-externals');
module.exports = {
target: 'node', // in order to ignore built-in modules like path, fs, etc.
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
devtool: "#source-map"
};
// test_index.js
// This gets replaced by webpack with the updated files on rebuild
var __webpackManifest__ = [];
// require all modules ending in ".test" from the
// src directory and all subdirectories
var testsContext = require.context("./src", true, /\.test$/);
function inManifest(path) {
return __webpackManifest__.indexOf(path) >= 0;
}
var runnable = testsContext.keys().filter(inManifest);
// // Run all tests if we didn't find any changes
if (!runnable.length) {
runnable = testsContext.keys();
}
runnable.forEach(testsContext);
TODO
FAQs
mocha cli with webpack support
The npm package mocha-webpack receives a total of 6,051 weekly downloads. As such, mocha-webpack popularity was classified as popular.
We found that 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.