Closed Fresheyeball closed 9 years ago
Thanks for reporting. I will take a look.
Does it work if you return the streams in your gulp tasks?
gulp.task('build:test', function(){
return gulp.src(src)
.pipe(gulpif(/purs/, psc))
.pipe(concat(dest.file))
.pipe(gulp.dest(dest.path));
});
...
gulp.task('test:unit',function(){
return gulp.src(dest.path+dest.file).pipe(karma);
});
I gave it a quick try, and it seems to work for me adding the returns.
Unfortunately, that did not help.
Are you getting a specific error when you run gulp test
? Also, is this an intermittent issue or does it happen every time?
I just tried it again and the tests seem to pass without the setTimeout
or the return
s. I am running purescript 0.5.4.1 and node 0.10.30. Are you on these versions?
I get the following error every time, and very reproducible.
JS 1.9.7 (Linux): Executed 0 of 0 ERROR (0.04 secs / 0 secs)
[03:55:22] 'test:unit' errored after 1.34 s
[03:55:22] Error in plugin 'gulp-karma'
karma exited with code 1
Error running task sequence: { task: 'test:unit',
message: 'test:unit stream',
duration: 1.336513534,
hrDuration: [ 1, 336513534 ],
err:
{ [Error: karma exited with code 1]
plugin: 'gulp-karma',
showStack: false,
message: 'karma exited with code 1' } }
The command "gulp test" exited with 1.
Done. Your build exited with 1.
here are the versions on my box:
psc 0.5.4.1
node v0.10.25
when I add in the timeout all works well
Thanks for the details. I've yet to see this error running the tests for purescript-timers
. Are you able to update to node 0.10.30 and try that?
@Fresheyeball Have you seen this error crop up again on the newest gulp-purescript
version? Thanks!
Closing. We can reopen or bring up a new issue if we start seeing this again.
Not sure if this is on gulp-purescript or is some other problem, but take a look at this file. The
2000ms
timeout is my work around for'test:unit'
firing before its ready. It seems like gulp-purescript is not accurately reporting when work is completed.