{"library":"mocha-webpack","title":"mocha-webpack","description":"A CLI tool that integrates Mocha test runner with Webpack bundling, allowing you to test modules that rely on Webpack features (loaders, plugins, resolve aliases) without pre-building or using hacks. Version 1.1.0 is the latest stable release (as of late 2018). It supports Mocha >=2.4.5 <=5 and Webpack 2.x/3.x. Key differentiators: bundling tests into a single bundle with Webpack's full pipeline (loaders, resolve, plugins), built-in source map support, memory-fs for speed (no disk writes), customizable file watcher, and support for multiple entry files/patterns. The project is effectively unmaintained (last release 2017) for Webpack 4+ compatibility.","language":"javascript","status":"deprecated","last_verified":"Sat Apr 25","install":{"commands":["npm install mocha-webpack"],"cli":{"name":"mocha-webpack","version":null}},"imports":["npx mocha-webpack --webpack-config webpack.config.js test/**/*.spec.js","import 'mocha-webpack'; // or require('mocha-webpack') — only side effects"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// package.json scripts\n{\n  \"scripts\": {\n    \"test\": \"mocha-webpack --webpack-config webpack.test.js --opts ./mocha-webpack.opts test/**/*.spec.js\"\n  }\n}\n// mocha-webpack.opts\n--timeout 10000\n--reporter spec\n// webpack.test.js (example)\nconst path = require('path');\nmodule.exports = {\n  mode: 'development',\n  resolve: {\n    extensions: ['.js', '.jsx', '.json']\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.jsx?$/,\n        exclude: /node_modules/,\n        use: {\n          loader: 'babel-loader',\n          options: { presets: ['@babel/preset-env', '@babel/preset-react'] }\n        }\n      }\n    ]\n  }\n};\n// Run: npx mocha-webpack --webpack-config webpack.test.js test/**/*.spec.js","lang":"javascript","description":"Configures mocha-webpack with a webpack config file, custom opts file, and runs tests matching a glob pattern.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}