Skip to content

Commit 16fc9a2

Browse files
committed
Jasmine needs to be listed as a framework
karma conf is now exported functions how embarrassing - now it really should work need ng-scenario for e2e tests need karma-junit-reporter trying without jasmine trying some other plugins adding jasmine in I will stab someone ng-scenario is probably needed trying adding karma-ng-scenario need a package.json to specify dev deps normalise quotes
1 parent c7ea21d commit 16fc9a2

File tree

3 files changed

+69
-32
lines changed

3 files changed

+69
-32
lines changed

config/karma-e2e.conf.js

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,37 @@
1-
basePath = '../';
1+
module.exports = function(config){
2+
config.set({
23

3-
files = [
4-
ANGULAR_SCENARIO,
5-
ANGULAR_SCENARIO_ADAPTER,
6-
'test/e2e/**/*.js'
7-
];
84

9-
autoWatch = false;
5+
basePath : '../',
106

11-
browsers = ['Chrome'];
7+
files : [
8+
'test/e2e/**/*.js'
9+
],
1210

13-
singleRun = true;
11+
autoWatch : false,
1412

15-
proxies = {
16-
'/': 'http://localhost:8000/'
17-
};
13+
browsers : ['Chrome'],
14+
15+
frameworks: ['ng-scenario'],
16+
17+
singleRun : true,
18+
19+
proxies : {
20+
'/': 'http://localhost:8000/'
21+
},
22+
23+
plugins : [
24+
'karma-junit-reporter',
25+
'karma-chrome-launcher',
26+
'karma-firefox-launcher',
27+
'karma-jasmine',
28+
'karma-ng-scenario'
29+
],
30+
31+
junitReporter : {
32+
outputFile: 'test_out/e2e.xml',
33+
suite: 'e2e'
34+
}
35+
36+
})}
1837

19-
junitReporter = {
20-
outputFile: 'test_out/e2e.xml',
21-
suite: 'e2e'
22-
};

config/karma.conf.js

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1-
basePath = '../';
1+
module.exports = function(config){
2+
config.set({
3+
basePath : '../',
24

3-
files = [
4-
JASMINE,
5-
JASMINE_ADAPTER,
6-
'app/lib/angular/angular.js',
7-
'app/lib/angular/angular-*.js',
8-
'test/lib/angular/angular-mocks.js',
9-
'app/js/**/*.js',
10-
'test/unit/**/*.js'
11-
];
5+
files : [
6+
'app/lib/angular/angular.js',
7+
'app/lib/angular/angular-*.js',
8+
'test/lib/angular/angular-mocks.js',
9+
'app/js/**/*.js',
10+
'test/unit/**/*.js'
11+
],
1212

13-
autoWatch = true;
13+
autoWatch : true,
1414

15-
browsers = ['Chrome'];
15+
frameworks: ['jasmine'],
1616

17-
junitReporter = {
18-
outputFile: 'test_out/unit.xml',
19-
suite: 'unit'
20-
};
17+
browsers : ['Chrome'],
18+
19+
plugins : [
20+
'karma-junit-reporter',
21+
'karma-chrome-launcher',
22+
'karma-firefox-launcher',
23+
'karma-jasmine'
24+
],
25+
26+
junitReporter : {
27+
outputFile: 'test_out/unit.xml',
28+
suite: 'unit'
29+
}
30+
31+
})}

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "angualrjs-seed",
3+
"description": "A starter project for angular js",
4+
"devDependencies": {
5+
"phantomjs" : "*",
6+
"karma" : "*",
7+
"karma-junit-reporter" : "*",
8+
"karma-jasmine" : "*",
9+
"karma-ng-scenario" : "*"
10+
}
11+
}

0 commit comments

Comments
 (0)