Closed LesterTheTester closed 10 years ago
I'm seeing this too - there are actually further problems (at least for me) since runner/run.js has been moved, so I had to edit grunt-nightwatch/tasks/nightwatch.js:171 to point to lib/runner/run.js instead to get anything at all to happen. Once I did that I started seeing the issues you describe, so I think that nightwatch has been refactored a fair bit and no longer passes the error info into the callback from run as it previously did.
I think you could short-term trivially fix it by having the grunt task refer to nightwatch 0.4.7 which seems to work (rather than ~0.4.7 which will get the latest 0.4.* I think, and the more recent 0.4.* build seem to have changed the API so its incompatible), but obviously it'd be nicer to have the task work with the more recent builds.
Looking at this, lib/runner/run.js
is calling finishCallback()
with null
as first argument even when globalResults.failed
is not zero.
If no one is working at this I'll fork and try a patch for.
cc: @beatfactor
Solved, the patch will come on a next release!
The issue persists, the report coming from Nightwatch's runner tell you FAILED but it never passing a valid err-value
for calling doneCallback(false)
as required.
And yeah, the last error code es always non-zero.
I hope someone can bring us some light.
Well, I'm working on solve these issues.
I think that develop
branch could pass your tests?
I think this is solved on 0.2.3
Though grunt-nightwatch now sets the exit code correctly, as of 0.1.8, it now does not print the pass/fail status anymore after it runs, like:
✔ Testing if element div.col-sm-4:nth-child(2) contains text: BitTorrent Bundle OK. 1 assertions passed.
Now, when I run the tests, I see no pass/fail status, which is extremely hard to debug in a build, since you'll see something like this, depite tests failing:
Done, without errors.
Yet, the exit code will be 1: $ echo $? 1
It also seems that tests stop executing once the first test fails. This afternoon someone broke test 2/3 in our tiny grunt-nightwatch suite, and the 3rd test never ran.
Do you have any ideas what's going on here? This behaviour definitely started with 0.1.8.
Thanks,
-Lester