@@ -19,26 +19,20 @@ function karmaServedFiles(ngVersion) {
19
19
'test/angular/' + version + '/angular.js' ,
20
20
'test/angular/' + version + '/angular-mocks.js' ,
21
21
'test/angular/' + version + '/angular-animate.js' ,
22
- 'test/util/ng1.systemjs.adapter.js'
23
22
] ;
24
23
}
25
24
26
25
var angularFiles = angular ( ngVersion ) . map ( function ( pattern ) {
27
26
return { watched : false , included : true , nocache : true , pattern : pattern } ;
28
27
} ) ;
29
28
30
- var srcFiles = [
31
- { watched : true , included : false , nocache : true , pattern : 'src/**/*.ts' } ,
32
- ] ;
33
-
34
- var testFiles = [
35
- { watched : true , included : false , nocache : true , pattern : 'test/**/*.ts' } ,
36
- { watched : true , included : false , nocache : true , pattern : 'test/**/*.js' }
37
- ] ;
38
-
39
- return [ ] . concat ( angularFiles ) . concat ( srcFiles ) . concat ( testFiles ) ;
29
+ return angularFiles . concat ( 'test/index.js' ) ;
40
30
}
41
31
32
+ var webpackConfig = require ( './webpack.config.js' ) ;
33
+ webpackConfig . entry = { } ;
34
+ webpackConfig . plugins = [ ] ;
35
+
42
36
module . exports = function ( config ) {
43
37
var ngVersion = config . ngversion || "1.5.0" ;
44
38
@@ -63,29 +57,25 @@ module.exports = function(config) {
63
57
// Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS
64
58
browsers : [ 'PhantomJS' ] ,
65
59
66
- frameworks : [ 'systemjs' , ' jasmine'] ,
60
+ frameworks : [ 'jasmine' ] ,
67
61
68
62
plugins : [
69
- require ( 'karma-systemjs' ) ,
63
+ require ( 'karma-webpack' ) ,
64
+ require ( 'karma-sourcemap-loader' ) ,
70
65
require ( 'karma-jasmine' ) ,
71
66
require ( 'karma-phantomjs-launcher' ) ,
72
67
require ( 'karma-chrome-launcher' )
73
68
] ,
74
69
70
+ webpack : webpackConfig ,
71
+
75
72
/* Files *available to be served* by karma, i.e., anything that will be require()'d */
76
73
files : karmaServedFiles ( ngVersion ) ,
77
- exclude : [ ] ,
78
- systemjs : {
79
- // Set up systemjs paths
80
- configFile : 'karma.system.config.js' ,
81
-
82
- files : [
83
- 'src/**/*.ts' ,
84
- 'node_modules/ui-router-core/lib/**/*'
85
- ] ,
86
-
87
- // karma-systemjs kludge: This is turned into a regexp and is the actual specs that are loaded
88
- testFileSuffix : "/test/\\S+Spec.[tj]s"
74
+
75
+ preprocessors : {
76
+ 'test/index.js' : [ 'webpack' , 'sourcemap' ] ,
77
+ '../src/ng1' : [ 'webpack' , 'sourcemap' ] ,
89
78
} ,
79
+
90
80
} ) ;
91
81
} ;
0 commit comments