Open maksimr opened 11 years ago
I don't really use grunt.watch so I haven't run into this. Do you have a test project or something I can look at? Like a repo or something?
https://github.com/maksimr/grunt-jasmine-issue
Now it fail with other Error. Test fail but grunt write that 'Done, without errors.'
@maksimr I ran into a similar issue when trying to run this plugin alongside an express plugin that required the nospawn option to be specified when using watch.
I found another grunt plugin that worked for me
https://github.com/tmtk75/grunt-contrib-jasmine-node
Might work as a temporary workaround for you until this issue is closed.
It looks like grunt-contrib-jasmine-node
is now deprecated (according to that link).
I've run into this problem as well (this task with grunt-contrib-watch
and spawn option set to false). The first run is fine (tests pass), the second and following runs it is trying to run the entire test suite multiple times (3 times on the second run, 5+ on the third, etc).
I've been able to set the grunt-contrib-watch
spawn option to true for now, but that is noticeably slower, so I would like to disable it again. It sounds like the issue is this task holding onto some global references between runs?
Note: pr #34 fixes this problem
I merged PR #15 which had multi task support and fixed for CoffeeScript, I am not sure that it also fixed these issues with watch. I will set up a project tomorrow and test if #15 also fixes it like #34 did, if not I'll look through PR #34 and see what else was changed there to fix the issue when using watch.
Hello! I have a problem with grunt watch and grunt-jasmine-node. When I run grunt watch and change some files first run grunt-jasmine-node is ok, but second fails with error 'TypeError'.
Any suggestions?
Thanks!
grunt.js:
trace:
Tests files locate in './test' directory: