0
Q:

how to run mocha tests form a file

Mocha is a JavaScript test framework!

var assert = require('assert');
describe('Array', function () {
  describe('#indexOf()', function () {
    it('should return -1 when the value is not present', function () {
      assert.equal([1, 2, 3].indexOf(4), -1);
    });
  });
});
5
Mocha is javascript test framework!
4
$ mocha -g 'logs a'
0

Tags

New to Communities?

Join the community