mirror of https://github.com/waku-org/js-waku.git
style: format karma conf
This commit is contained in:
parent
5c022da3ea
commit
4054f6a751
|
@ -1,49 +1,49 @@
|
||||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
||||||
const webpack = require('webpack');
|
const webpack = require("webpack");
|
||||||
|
|
||||||
module.exports = function(config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
frameworks: ['webpack', 'mocha'],
|
frameworks: ["webpack", "mocha"],
|
||||||
files: ['src/lib/**/!(node).spec.ts'],
|
files: ["src/lib/**/!(node).spec.ts"],
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'src/lib/**/!(node).spec.ts': ['webpack']
|
"src/lib/**/!(node).spec.ts": ["webpack"],
|
||||||
},
|
},
|
||||||
envPreprocessor: ['CI'],
|
envPreprocessor: ["CI"],
|
||||||
reporters: ['progress'],
|
reporters: ["progress"],
|
||||||
browsers: ['ChromeHeadless'],
|
browsers: ["ChromeHeadless"],
|
||||||
singleRun: true,
|
singleRun: true,
|
||||||
client: {
|
client: {
|
||||||
mocha: {
|
mocha: {
|
||||||
timeout: 6000 // Default is 2s
|
timeout: 6000, // Default is 2s
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
webpack: {
|
webpack: {
|
||||||
mode: 'production',
|
mode: "production",
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.(js|tsx?)$/,
|
test: /\.(js|tsx?)$/,
|
||||||
use: 'ts-loader',
|
use: "ts-loader",
|
||||||
exclude: /(node_modules)|(node\.spec\.ts)/
|
exclude: /(node_modules)|(node\.spec\.ts)/,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /node\.spec\.ts$/,
|
test: /node\.spec\.ts$/,
|
||||||
use: 'ignore-loader'
|
use: "ignore-loader",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.CI': process.env.CI || false
|
"process.env.CI": process.env.CI || false,
|
||||||
}),
|
}),
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
process: 'process/browser.js'
|
process: "process/browser.js",
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.ts', '.js']
|
extensions: [".ts", ".js"],
|
||||||
|
},
|
||||||
|
stats: { warnings: false },
|
||||||
},
|
},
|
||||||
stats: { warnings: false }
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue