Home / npm packages / mocha
Every file of mocha@12.0.3 as published on npm: 73 files, 889 KB. Search them by exact text or regex, in milliseconds.
It uses: eval(), child_process, process.env, the fs module, XMLHttpRequest.
| API | In mocha | |
|---|---|---|
| eval() runs a string as JavaScript | Yes: 1 file e.g. lib/nodejs/worker.cjs | See the lines |
| new Function() builds a function from a string, like eval (with or without new) | No | Who does |
| child_process starts other programs | Yes: 1 file e.g. bin/mocha.js | See the lines |
| process.env reads environment variables | Yes: 5 files e.g. lib/nodejs/buffered-worker-pool.cjs | See the lines |
| the fs module reads and writes files | Yes: 10 files e.g. lib/cli/config.cjs | See the lines |
| http / https makes or serves HTTP requests with Node's own modules | No | Who does |
| fetch() makes HTTP requests | No | Who does |
| XMLHttpRequest makes HTTP requests the old browser way | Yes: 2 files e.g. mocha.js | See the lines |
| crypto hashes, encrypts or makes random numbers | No | Who does |
| WebAssembly loads WebAssembly code | No | Who does |
| document.cookie reads or writes browser cookies | No | Who does |
| install scripts runs a script when it's installed | No | Who does |
Exact matches in the published files, so a mention in a comment counts too: open the lines to check.
| File | Size |
|---|---|
mocha.js | 484 KB |
lib/runner.js | 39 KB |
lib/mocha.cjs | 37 KB |
lib/cli/watch-run.cjs | 21 KB |
lib/utils.cjs | 21 KB |
lib/suite.js | 16 KB |
lib/reporters/base.js | 16 KB |
lib/nodejs/parallel-buffered-runner.cjs | 13 KB |
lib/nodejs/serializer.js | 13 KB |
lib/reporters/html.js | 12 KB |
lib/cli/parse-args.js | 12 KB |
lib/errors.js | 11 KB |
lib/runnable.js | 11 KB |
mocha.css | 10 KB |
lib/cli/run-helpers.cjs | 9.1 KB |
lib/plugin-loader.js | 8.4 KB |
package.json | 7.1 KB |
lib/nodejs/esm-utils.cjs | 6.7 KB |
lib/reporters/tap.js | 6.6 KB |
lib/cli/run-option-metadata.cjs | 6.3 KB |
lib/reporters/xunit.js | 6.0 KB |
lib/reporters/nyan.js | 5.6 KB |
lib/nodejs/buffered-worker-pool.cjs | 5.5 KB |
lib/cli/options.cjs | 5.4 KB |
browser-entry.js | 4.9 KB |
lib/interfaces/common.js | 4.7 KB |
bin/mocha.js | 4.7 KB |
README.md | 4.6 KB |
lib/nodejs/worker.cjs | 4.6 KB |
lib/nodejs/reporters/parallel-buffered.cjs | 4.5 KB |
Version 12.0.3 of mocha publishes 73 files of source, 889 KB in all, not counting images, fonts and source maps.
Yes: mocha calls eval() in 1 of its files.
Yes: mocha uses child_process in 1 of its files.
No: mocha has no preinstall, install or postinstall script in its package.json.
The same engine answers over your documents and repositories: exact text and regex, every match counted, from your code or your AI agent.