Reputation: 5731
Running yeoman server:test
opens Jasmine in my browser and says that my test has passed. Now I want to try the same, but without a browser - using PhantomJS on the CLI. Unfortunately, running yeoman test
only throws a:
Running "jasmine:all" (jasmine) task
Running specs for index.html
>> 0 assertions passed in 0 specs (0ms)
Why doesn't it find any tests, even though everything is included in my test/index.html
and works pretty well using yeoman server:test
?
I used yeoman init jasmine:app --force
over my project and adjusted the Gruntfile.js
as described here. It looks like that:
...
// headless testing through PhantomJS
jasmine: {
all: ["test/**/*.html"]
},
...
// Alias the `test` task to run the `jasmine` task instead
grunt.registerTask("test", "jasmine");
...
Note: My tests are written in CoffeeScript.
Upvotes: 1
Views: 520
Reputation: 5731
After some research I found out that PhantomJS is not able to find the files at the same location as ´yeoman server´ or yeoman server:test
does.
I precised my question in another thread: Running tests in both headless and browser
Upvotes: 1