Git Product home page Git Product logo

mocha-mongo-reporter's Introduction

mongoreporter

Description

A reporter for mocha that stores results directly to a mongo db

Usage

Install mongoreporter from npm. When running from the command line, you have to specify --no-exit

$ npm install mongoreporter  
...  
$ MONGOURL=mongodb://dbuser:dbpassword@dbhost:dbport/dbname mocha -R mongoreporter test/one.js --no-exit  

programmatically:

var mocha = new Mocha({
    ui: 'bdd',
    reporter: "mongoreporter",
    reporterOption: {
    	url: "mongodb://dbuser:dbpassword@dbhost:dbport/dbname"
	}
});
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 mongoreporter
...
$ MONGOURL="mongodb://localhost:27017/testruns" multi="spec=- mongoreporter=/dev/null" mocha -R mocha-multi

mocha-mongo-reporter's People

Contributors

coyotebringsfire avatar

Watchers

 avatar

Forkers

techmexdev

mocha-mongo-reporter's Issues

Issue with capitalization in require('dateFormat')

Hello,

Thanks for sharing this project.

When trying to run this on Centos I got an exception stating that the dateformat dependency was failing. Turns out that you have a small capitalization typo in there that causes this error on linux (or perhaps a recent version of node introduced module name case sensitivity):

https://github.com/coyotebringsfire/mocha-mongo-reporter/blob/master/mocha-mongo-reporter.js

on line 3:
dateFormat = require('dateFormat'), now;

should be

dateFormat = require('dateformat'), now;

Thanks!

Regards,
Blaze Kozlik

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.