question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation should give an example of using `mocha` property in `package.json`

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
akopchinskiycommented, Aug 12, 2020

Mocha’s documentation about configs really sucks

1reaction
postspectacularcommented, Oct 19, 2019

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found