I got this working by using the done
callback that comes with mocha
. The problem was that fullcalendar
takes some time to render, but my test was firing immediately, so there was no time for the fc
class to be appended. Put another way, my code is asynchronous and my test was not. The following code works:
it('renders fullCalendar plugin', function(done) {
$('#konacha').fullCalendar();
done();
$('.fc').should.exist;
});