Mocha
Disable Timeout
mocha <your file> --no-timeoutsTesting iteration with Mocha
npm install it-eachEnable log by using debug package
var debug = require('debug');
var logger = debug('<your debug token>')----for mac---
DEBUG=<your file name> mocha test/test.js
----for windows----
mocha test/test.js DEBUG=<your debug token>Run test after db connection ready
before(function(done){ MongoClient.connect(url, function(err, db) { assert.equal(null, err); console.log("Connected successfully to server"); dbInstance = db; done(err) }); })
Last updated