It seems that the async functions (waits, waitsFor, runs) in Jasmine are not accessible when running it from Grunt.
Grunt setup:
jasmine:{
pivotal:{
src: 'src/**/*.js',
options:{
specs: 'spec/**/*.spec.js'
}
}
}
Jasmine spec example:
describe('jasmine', function(){
it("should find 'waits'", function(){
waits(1000);
});
it("should find 'waitsFor'", function(){
waitsFor(function(){}, 1000);
});
it("should find 'runs'", function(){
runs(function(){});
});
})
Jasmine output error:
jasmine
× should find 'waits'
ReferenceError: Can't find variable: waits in file:///G:/Projects/myproj/spec/test.spec.js (line 3) (1)
× should find 'waitsFor'
ReferenceError: Can't find variable: waitsFor in file:///G:/Projects/myproj/spec/test.spec.js (line 6) (1)
× should find 'runs'
ReferenceError: Can't find variable: runs in file:///G:/Projects/myproj/spec/test.spec.js (line 9) (1)
Is there something I'm overlooking?