Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
giswqs
GitHub Repository: giswqs/geemap
Path: blob/master/karma.conf.cjs
2313 views
1
// Karma configuration file, see link for more information
2
// https://karma-runner.github.io/1.0/config/configuration-file.html
3
process.env.CHROME_BIN = require('puppeteer').executablePath();
4
5
// test/karma.conf.js
6
module.exports = config => {
7
config.set({
8
frameworks: ['jasmine', 'webpack'],
9
basePath: '',
10
type: 'module',
11
files: [
12
{pattern: 'js/*.ts', type:'module'},
13
{pattern: 'tests/*.spec.ts', type:'module'},
14
],
15
exclude: [],
16
client: {
17
clearContext: false, // leave Jasmine Spec Runner output visible in browser
18
},
19
preprocessors: {
20
'**/*.ts': ['webpack'],
21
},
22
webpack: {
23
mode: 'development',
24
devtool: 'inline-source-map',
25
module: {
26
rules: [
27
{
28
test: /\.ts$/,
29
loader: "ts-loader",
30
exclude: /node_modules/,
31
options: {
32
configFile: "tsconfig.webpack.json"
33
}
34
},
35
],
36
},
37
resolve: {
38
extensions: ['.ts'],
39
},
40
stats: {
41
colors: true,
42
modules: true,
43
reasons: true,
44
errorDetails: true
45
},
46
},
47
reporters: ['spec', 'progress', 'kjhtml'],
48
port: 9876,
49
colors: true,
50
logLevel: config.LOG_INFO,
51
autoWatch: true,
52
browsers: ['Chrome'],
53
singleRun: false,
54
restartOnFileChange: true,
55
customLaunchers: {
56
ChromeHeadlessNoSandbox: {
57
base: 'ChromeHeadless',
58
flags: ['--no-sandbox'],
59
},
60
},
61
});
62
};
63