New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mocha-audio-reporter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-audio-reporter

play sounds when your tests run

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#mocha-audio-reporter ##Description A reporter for mocha that plays mp3 tunes on mocha events

##Known Issues the lame encoder and/or speaker aren't very stable and have a tendency to crash

##Tests The automated tests for this reporter are in mocha-audio-reporter-test repo

$ git clone https://github.com/coyotebringsfire/mocha-audio-reporter-test.git
...
$ cd mocha-audio-reporter-test
mocha-audio-reporter-test $ npm install
...
mocha-audio-reporter-test$ npm test
...

##Usage

var mocha = new Mocha({
    ui: 'bdd',
    reporter: "mocha-audio-reporter",
    reporterOption: {
    	onStart: __dirname+"/audio/start.mp3",
    	onPass: __dirname+"/audio/pass.mp3",
    	onFail: __dirname+"/audio/fail.mp3",
    	onSuiteFailure: __dirname+"/audio/suite_failure.mp3",
    	onSuitePass: __dirname+"/audio/suite_pass.mp3"
	}
});
mocha.addFile("test/one.js");
mocha.run(...);

I like to use this with mocha-multi reporter, using spec to print test results, something like this

$ npm install mocha-multi
...
$ npm install mocha-audio-reporter
...
var mocha = new Mocha({
    ui: 'bdd',
    reporter: "mocha-multi",
    reporterOption: {
	    mocha-audio-reporter: {
		    stdout: '/dev/null',
	        options: {
		        onStart: __dirname+"/audio/start.mp3",
		        onPass: __dirname+"/audio/pass.mp3",
		        onFail: __dirname+"/audio/fail.mp3",
		        onSuiteFailure: __dirname+"/audio/suite_failure.mp3",
		        onSuitePass: __dirname+"/audio/suite_pass.mp3"
		    }
	    },
	    spec: {
		    stdout: "-"
		}
	}
});
mocha.addFile("test/one.js");
mocha.run(...);

Keywords

FAQs

Package last updated on 15 May 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc