I'm pretty new to meteor so I'm just writing a simple app but really want to make it as TDD as possible (worth mentioning I'm also new to Mocha). So I've added the mike:mocha
and velocity:core
packages and written a super simple initial test just to see if I can get things to work, which I've added at tests/mocha/client/tests.js:
if (typeof MochaWeb != 'undefined') {
MochaWeb.testOnly(function () {
describe('Friends are added successfully', function () {
it('Should add a new person to the Friend collection', function(done) {
var friendId = Friends.insert(
{ firstName: 'New',
lastName: 'Friend'});
var friend = Friends.findOne({'firstName':'New'});
console.log(friend);
chai.assert.equal(friend.length === 1);
done();
});
});
})
;}
My problem is that when I run either the meteor
command or meteor --test
, I get nothing in the terminal apart from the expected:
=> Started proxy.
=> Started MongoDB.I20150115-22:31:03.216(0)? [velocity] chokadir watching /correctDirectory/tests
=> Started your app.
=> App running at: http://localhost:3000/
But then Velocity just hangs (a blue circle with a wider blue ring around it - no greens or red), pulsating and not providing any feedback whatsoever. None on the developer console or the terminal either! I tried checking localhost:5000 but this comes back as 'not available'.
Not sure how to start with figuring this one out!
Thanks in advance to anyone who can help :)