From 089ea84c77394c9d94bc13be10792e2f8537b6e2 Mon Sep 17 00:00:00 2001 From: Andras Ivanyi Date: Thu, 18 Aug 2016 08:00:23 +0200 Subject: [PATCH] fix: karma configuration in ng2 blueprint updated, allowing the generated application to be unit tested on travis. The original karma configuration contained a custom launcher for travis, but it was not used anywhere. By extending the configuration, it is now automatically applied if travis is detected, and also enabled single run mode for the CI tool. --- addon/ng2/blueprints/ng2/files/config/karma.conf.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addon/ng2/blueprints/ng2/files/config/karma.conf.js b/addon/ng2/blueprints/ng2/files/config/karma.conf.js index e5ab25543993..b4a3d96fd7f2 100644 --- a/addon/ng2/blueprints/ng2/files/config/karma.conf.js +++ b/addon/ng2/blueprints/ng2/files/config/karma.conf.js @@ -39,4 +39,10 @@ module.exports = function (config) { browsers: ['Chrome'], singleRun: false }); + + if(process.env.TRAVIS) { + config.browsers = ['Chrome_travis_ci']; + config.autoWatch = false; + config.singleRun = true; + } };