I’ve managed to successfully build my maven project which uses the jasmine-maven-plugin to put the source and test javascript files in the right places. When I have a simple test such as:
describe('true', function() {
it('should be true', function() {
expect(true).toBe(true);
})
})
the whole thing builds with no problems, and all the jasmine specs pass. But when I try to create an instance of an object that I’ve outlined in one of the files that are included target/jasmine/src folder, I get a “ReferenceError: “Stat” is not defined” error.
describe('stat test',function() {
var stat = new Stat();
it('get data',function() {
stat.data = 13;
expect(stat.getData()).toBe(13);
});
});
Are the js files not loading properly? Totally stumped here.
Did you set up in the correct way jasmine? It seems that jasmine can’t find your js files, here you have an example of the maven configuration:
At the bottom of this page: http://searls.github.com/jasmine-maven-plugin you have all the possibles tags.
Check if you have your pom in the correct way… Hope it can help!!