goinstant / gulp-dalek

BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Callback after completion of the tests #3

Open vergissberlin opened 10 years ago

vergissberlin commented 10 years ago

To make the tests run on travis CI, I run a web server. To shut down the server again, I need a message when the test was terminated.

Do you have any idea?

This was my one:


var gulp = require('gulp'),
    connect = require('gulp-connect'),
    dalek = require('gulp-dalek');

gulp.task('connect', function () {
  return connect.server({
    root: 'www',
    port: 1980
  });
});

gulp.task('test', ['connect'], function () {
  gulp.src(['tests/integration/localTest.js'])
      .pipe(dalek({
        browser: ['phantomjs'],
        reporter: ['console']
      })).on('endStream', function() {
        console.log('This is the end');
        connect.serverClose();
      });
});
gulp.task('default', ['connect', 'test']);

Thank u again

davelandry commented 9 years ago

@vergissberlin, were you able to find a solution for this problem?

vergissberlin commented 9 years ago

Hi davelandry,

You can see it here: https://travis-ci.org/vergissberlin/dalekjs-travisci

davelandry commented 9 years ago

Looking at your code, it seems that the tests are not failing when they should be, is that correct?

vergissberlin commented 9 years ago

That's correct. It seams to be a bug from dalek-cli https://github.com/dalekjs/dalek-cli/issues/12