I am trying to perform an asynchronous unit test:
it('Async thing', function (done) {
scope.$on('async-stuff-happened', function (e) {
console.log(e);
done();
expect(e.stuff).toEqual("stuff");
});
scope.ayncStuff();
});
I can see in the console the line console.log(e)
executed, but the test result is :
SPEC HAS NO EXPECTATIONS Async thing
What am I missing?