forked from ton-org/ton-crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
46 lines (40 loc) · 1.42 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module.exports = function (config) {
config.set({
plugins: [
'karma-webpack',
'karma-jasmine',
'karma-chrome-launcher'
],
webpack: {
resolve: {
fallback: { "crypto": false },
extensions: ['.js', '.ts', '.json']
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader'
},
],
}
// Your webpack config here
},
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
// Here I'm including all of the the Jest tests which are all under the __tests__ directory.
// You may need to tweak this patter to find your test files/
files: ['./karma.setup.js', 'src/**/*.ts'],
browsers: ['ChromeHeadless'],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'./karma.setup.js': ['webpack'],
'src/**/*.ts': ['webpack'],
},
});
};