
Security News
AI Slop Is Polluting Bug Bounty Platforms with Fake Vulnerability Reports
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.
Run arbitrary commands instead of mocha to integrate with popular IDEs
Run arbitrary commands instead of mocha to integrate with popular IDEs
npm install --save-dev fake-mocha
If you're developing for a production platform, chances are you're either currently running your tests in a production-like virtual machine, container, or remote dev server, or you should be.
Popular IDEs such as those in the JetBrains family -- IntelliJ IDEA, WebStorm, PHPStorm, PyCharm, etc., have excellent mocha integration for Node.js projects, provided by the optional NodeJS plugin. It provides a fantastic interface for running and exploring the results of tests, jumping right to errors or test definitions when they're clicked on.
The problem is, that mocha integration is local-only. There's no way to configure a remote run in a Docker container or a Vagrant VM, and so you're sunk if your tests require a local database, a specific version of Node.js, or some other production-like dependency.
Using fake-mocha, you can configure the mocha integration to look into
node_modules/fake-mocha
instead of node_modules/mocha
, and in the
"Extra Mocha options" section, tell it to execute your own test script. For
example, if you'd prefer mocha to run make test
, just set those extra
options to --command "make test"
. Fake-mocha will ignore all the other
arguments and just run the command you gave it. It will also set the working
directory to your project root, pass through stdio, and exit with the same exit
status code as the command it executed.
Running a different command is only half the battle, and that's what fake-mocha
solves for you. It's up to you to invoke actual mocha in your dev
environment, and pass it the IntelliJ mocha reporter provided by the IDE
plugin. See the examples
folder for a Makefile that will do exactly that
to run your tests in the official 'node' Docker container.
fake-mocha is licensed under the MIT license. Please see LICENSE.txt
for full
details.
fake-mocha was created in a flurry of frustration at TechnologyAdvice.
v0.1.0 - 2015-07-21
FAQs
Run arbitrary commands instead of mocha to integrate with popular IDEs
The npm package fake-mocha receives a total of 10 weekly downloads. As such, fake-mocha popularity was classified as not popular.
We found that fake-mocha 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
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.
Research
Security News
The Socket Research team investigates a malicious Python package disguised as a Discord error logger that executes remote commands and exfiltrates data via a covert C2 channel.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.