Git Product home page Git Product logo

mocha-audio-reporter's Introduction

#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(...);

mocha-audio-reporter's People

Watchers

 avatar

Forkers

woldie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.