test: use ephemeral port for e2e server

This commit is contained in:
Ryan Graham 2016-01-07 13:29:27 -08:00 committed by Miroslav Bajtoš
parent aff49ff63f
commit db0678baa6
1 changed files with 4 additions and 1 deletions

View File

@ -217,7 +217,10 @@ module.exports = function(grunt) {
grunt.registerTask('e2e-server', function() {
var done = this.async();
var app = require('./test/fixtures/e2e/app');
app.listen(3000, done);
app.listen(0, function() {
process.env.PORT = this.address().port;
done();
});
});
grunt.registerTask('e2e', ['e2e-server', 'karma:e2e']);