You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project is a framework and preprocessor for Karma that combines test files and dependencies into 2 shared bundles and 1 chunk per test file. It relies on webpack to generate the bundles/chunks and to keep it updated during autoWatch=true.
99
+
This project is a framework and preprocessor for Karma that combines test files and dependencies into 2 shared bundles
100
+
and 1 chunk per test file. It relies on webpack to generate the bundles/chunks and to keep it updated during
101
+
autoWatch=true.
99
102
100
-
The first preproccessor triggers the build of all the bundles/chunks and all following files just return the output of this one build process.
103
+
The first preproccessor triggers the build of all the bundles/chunks and all following files just return the output of
104
+
this one build process.
101
105
102
106
### Webpack typescript support
103
107
104
-
By default karma-webpack forces *.js files so if you test *.ts files and use webpack to build typescript to javascript it works out of the box.
108
+
By default karma-webpack forces *.js files so if you test *.ts files and use webpack to build typescript to javascript
109
+
it works out of the box.
105
110
106
111
If you have a different need you can override by settig `webpack.transformPath`
107
112
108
113
```js
109
114
// this is the by default applied transformPath
110
115
webpack: {
111
116
transformPath: (filepath) => {
112
-
// force *.js files by default
113
-
constinfo=path.parse(filepath);
114
-
return`${path.join(info.dir, info.name)}.js`;
115
-
},
116
-
},
117
+
// force *.js files by default
118
+
constinfo=path.parse(filepath);
119
+
return`${path.join(info.dir, info.name)}.js`;
120
+
},
121
+
}
122
+
,
117
123
```
118
124
119
125
### `Source Maps`
@@ -127,98 +133,113 @@ npm i -D karma-sourcemap-loader
0 commit comments