Documentation should give an example of using `mocha` property in `package.json`
See original GitHub issueIs your feature request related to a problem or a nice-to-have?? Please describe.
The documentation mentions the ability to use a property in package.json
instead of a separate mocha.opts
file.
Describe the solution you’d like I can’t find an example of actually doing this anywhere.
Describe alternatives you’ve considered
It’s pretty hard to search online for people talking about “the mocha
property in package.json
”, since “package.json” is probably the single most common string in any page about Node tooling.
Additional context
I’m specifically interested in how to specify flags that can be repeated, e.g. --file
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
mocha.opts deprecated, how to migrate to package.json?
I'm using file property to define which files should go first as they need to be executed first. They will be executed in...
Read more >Mocha - the fun, simple, flexible JavaScript test framework
simple, flexible, fun. Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun....
Read more >Getting Started with Node.js and Mocha - Semaphore Tutorial
Mocha is a simple, extensible and fast testing library for Node.js. This article will walk you through its installation, configuration and usage.
Read more >package.json - npm Docs
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >Mocharc: The Essential Mocha Configuration Guide - Testim.io
A sample mocha.opts file we're using in one of our projects looks like ... For example, the mocha property in the package.json file...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Mocha’s documentation about configs really sucks
It would be great to extend these example configs and show how this setup can be used to specify additional options for Node itself. I’ve been trying to enable the
--experimental-wasm-simd
option via any of the described config methods, but with no avail. How can this be done?