style: format karma conf

This commit is contained in:
Franck Royer 2022-07-26 14:40:40 +10:00 committed by fryorcraken.eth
parent 5c022da3ea
commit 4054f6a751
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 23 additions and 23 deletions

View File

@ -1,49 +1,49 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();
const webpack = require('webpack');
process.env.CHROME_BIN = require("puppeteer").executablePath();
const webpack = require("webpack");
module.exports = function(config) {
module.exports = function (config) {
config.set({
frameworks: ['webpack', 'mocha'],
files: ['src/lib/**/!(node).spec.ts'],
frameworks: ["webpack", "mocha"],
files: ["src/lib/**/!(node).spec.ts"],
preprocessors: {
'src/lib/**/!(node).spec.ts': ['webpack']
"src/lib/**/!(node).spec.ts": ["webpack"],
},
envPreprocessor: ['CI'],
reporters: ['progress'],
browsers: ['ChromeHeadless'],
envPreprocessor: ["CI"],
reporters: ["progress"],
browsers: ["ChromeHeadless"],
singleRun: true,
client: {
mocha: {
timeout: 6000 // Default is 2s
}
timeout: 6000, // Default is 2s
},
},
webpack: {
mode: 'production',
mode: "production",
module: {
rules: [
{
test: /\.(js|tsx?)$/,
use: 'ts-loader',
exclude: /(node_modules)|(node\.spec\.ts)/
use: "ts-loader",
exclude: /(node_modules)|(node\.spec\.ts)/,
},
{
test: /node\.spec\.ts$/,
use: 'ignore-loader'
}
]
use: "ignore-loader",
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env.CI': process.env.CI || false
"process.env.CI": process.env.CI || false,
}),
new webpack.ProvidePlugin({
process: 'process/browser.js'
})
process: "process/browser.js",
}),
],
resolve: {
extensions: ['.ts', '.js']
extensions: [".ts", ".js"],
},
stats: { warnings: false },
},
stats: { warnings: false }
}
});
};