Skip to content

Commit 612615e

Browse files
committed
Added script which runs karma unit and e2 tests + corrected single-run mode for unit test when in Travis CI env.
1 parent fcc9435 commit 612615e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

config/karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = function(config) {
2929
},
3030

3131
customLaunchers: {
32-
Chrome_travis_ci: {
32+
Chrome_travis_ci: {
3333
base: 'Chrome',
3434
flags: ['--no-sandbox']
3535
}
@@ -38,5 +38,6 @@ module.exports = function(config) {
3838

3939
if (process.env.TRAVIS) {
4040
config.browsers = ['Chrome_travis_ci'];
41+
config.singleRun = true;
4142
}
4243
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"scripts": {
1010
"start": "node scripts/web-server.js",
11-
"test": "scripts/test.sh"
11+
"test": "scripts/all-tests.sh"
1212
},
1313
"devDependencies": {
1414
"jasmine-core": "^2.99.1",

scripts/all-tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
BASE_DIR=`dirname $0`
3+
$BASE_DIR/test.sh
4+
$BASE_DIR/e2e-test.sh

0 commit comments

Comments
 (0)