radiomanifest.js/karma.config.js

31 lines
832 B
JavaScript
Raw Permalink Normal View History

2021-11-18 15:35:32 +01:00
module.exports = function (config) {
2021-11-19 18:08:09 +01:00
config.set({
2023-09-14 01:07:07 +02:00
frameworks: ["mocha"],
2021-11-19 18:08:09 +01:00
// plugins: ['karma-webpack', 'karma-mocha', 'karma-chai-as-promised'],
webpack: {
// karma watches the test entry points
// Do NOT specify the entry option
// webpack watches dependencies
// webpack configuration
},
preprocessors: {
2023-09-14 01:07:07 +02:00
"test/**/*.js": ["webpack"],
"radiomanifest.js": ["webpack"],
2021-11-19 18:08:09 +01:00
},
2023-09-14 01:07:07 +02:00
files: ["radiomanifest.js", "test/**/*.js"],
reporters: ["progress"],
2021-11-19 18:08:09 +01:00
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
2023-09-14 01:07:07 +02:00
browsers: ["ChromeHeadless", "FirefoxHeadless"],
2021-11-19 18:08:09 +01:00
autoWatch: false,
concurrency: Infinity,
customLaunchers: {
FirefoxHeadless: {
2023-09-14 01:07:07 +02:00
base: "Firefox",
flags: ["-headless"],
},
},
});
};