Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit 970de17

Browse files
committed
fix(test): refactor karma config
1 parent 666d422 commit 970de17

File tree

3 files changed

+27
-40
lines changed

3 files changed

+27
-40
lines changed

karma/conf.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
basePath : '',
3+
files : [
4+
{pattern: '../node_modules/angular/angular.min.js', watched: true, included: true, nocache: true},
5+
{pattern: '../node_modules/ngstorage/ngStorage.min.js', watched: true, included: true, nocache: true},
6+
{pattern: '../node_modules/angular-base64/angular-base64.min.js', watched: true, included: true, nocache: true},
7+
{pattern: '../node_modules/osmtogeojson/osmtogeojson.js', watched: true, included: true, nocache: true},
8+
{pattern: '../node_modules/angular-mocks/angular-mocks.js', watched: false, included: true, served: true},
9+
{pattern: '../node_modules/ng-describe/dist/ng-describe.js', watched: false, included: true, served: true},
10+
{pattern: '../dist/osm-full.js', watched: true, included: true, nocache: true},
11+
{pattern: '../src/**/*.spec.js', watched: true, included: true, nocache: true}
12+
],
13+
exclude : [],
14+
autoWatch : true,
15+
frameworks: ['jasmine'],
16+
reporters: ['dots'],
17+
logLevel: 'LOG_DEBUG'
18+
};

karma/karma.conf.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
1+
var conf = require('./conf');
2+
13
module.exports = function(config){
2-
config.set({
3-
basePath : '',
4-
files : [
5-
{pattern: '../node_modules/angular/angular.min.js', watched: true, included: true, nocache: true},
6-
{pattern: '../node_modules/ngstorage/ngStorage.min.js', watched: true, included: true, nocache: true},
7-
{pattern: '../node_modules/angular-base64/angular-base64.min.js', watched: true, included: true, nocache: true},
8-
{pattern: '../node_modules/osmtogeojson/osmtogeojson.js', watched: true, included: true, nocache: true},
9-
{pattern: '../node_modules/angular-mocks/angular-mocks.js', watched: false, included: true, served: true},
10-
{pattern: '../node_modules/ng-describe/dist/ng-describe.js', watched: false, included: true, served: true},
11-
{pattern: '../dist/osm-full.js', watched: true, included: true, nocache: true},
12-
{pattern: '../src/**/*.spec.js', watched: true, included: true, nocache: true}
13-
],
14-
exclude : [],
15-
autoWatch : true,
16-
frameworks: ['jasmine'],
17-
reporters: ['dots'],
18-
logLevel: 'LOG_DEBUG'
19-
});
4+
config.set(conf);
205
};

karma/karma.travis.conf.js

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1+
var conf = require('./conf');
2+
13
module.exports = function(config){
2-
config.set({
3-
basePath : '',
4-
files : [
5-
{pattern: '../dist/dependencies.js', watched: true, included: true, nocache: true},
6-
{pattern: '../node_modules/osmtogeojson/osmtogeojson.js', watched: true, included: true, nocache: true},
7-
{pattern: '../node_modules/angular-mocks/angular-mocks.js', watched: false, included: true, served: true},
8-
{pattern: '../node_modules/ng-describe/dist/ng-describe.js', watched: false, included: true, served: true},
9-
{pattern: '../dist/osm.js', watched: true, included: true, nocache: true},
10-
{pattern: '../src/**/*.spec.js', watched: true, included: true, nocache: true}
11-
],
12-
exclude : [],
13-
autoWatch : true,
14-
frameworks: ['jasmine'],
15-
browsers : ['PhantomJS'],
16-
plugins : [
17-
'karma-jasmine',
18-
'karma-phantomjs-launcher'
19-
],
20-
reporters: ['dots'],
21-
logLevel: 'LOG_DEBUG'
22-
});
23-
};
4+
conf.browsers = ['PhantomJS'];
5+
config.singleRun = true;
6+
config.set(conf);
7+
};

0 commit comments

Comments
 (0)