I’m using Mocha and Chai to run unit tests. I have four tests. I can get all four tests to run only if I give them the same name, and only if I give them the name shown below. This seems really bizarre. Does anyone know what’s going on?
describe('Testing methods', function (done) {
this.timeout(5000);
before(function (done) {
done();
});
beforeEach(function (done) {
done();
});
afterEach(function (done){
done();
});
it('We should be able to add things to collections', function (done) {
console.log('Running test 1');
done();
});
// DOESN'T WORK
it('One of these things is not like the others', function (done) {
console.log('Running test 2');
done();
});
it('We should be able to add things to collections', function (done) {
console.log('Running test 3');
done();
});
it('We should be able to add things to collections', function (done) {
console.log('Running test 4');
done();
});
});