forked from kossnocorp/typesaurus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
66 lines (53 loc) · 1.33 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const webpack = require('webpack')
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = config => {
config.set({
files: ['test/karmaTests.ts'],
preprocessors: {
'test/karmaTests.ts': ['webpack', 'sourcemap']
},
frameworks: ['jasmine'],
browsers: ['ChromeHeadless'],
concurrency: 1,
client: {
jasmine: {
timeoutInterval: 25000
}
},
browserNoActivityTimeout: 40000,
webpack: {
devtool: 'inline-source-map',
resolve: {
extensions: ['.json', '.js', '.ts']
},
plugins: [
new webpack.DefinePlugin({
'process.env.FIREBASE_PROJECT_ID': JSON.stringify(
process.env.FIREBASE_PROJECT_ID
),
'process.env.FIREBASE_API_KEY': JSON.stringify(
process.env.FIREBASE_API_KEY
),
'process.env.FIREBASE_USERNAME': JSON.stringify(
process.env.FIREBASE_USERNAME
),
'process.env.FIREBASE_PASSWORD': JSON.stringify(
process.env.FIREBASE_PASSWORD
)
})
],
module: {
rules: [
{
test: /\.ts$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
}
},
webpackMiddleware: {
stats: 'errors-only'
}
})
}