-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.cjs
31 lines (30 loc) · 1.13 KB
/
karma.conf.cjs
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
module.exports = async function (config) {
const {installBrowsersForNpmInstall, registry} = require('playwright-core/lib/server');
await installBrowsersForNpmInstall(['firefox', 'chromium']);
process.env.FIREFOX_BIN = registry.findExecutable('firefox').executablePath();
process.env.CHROMIUM_BIN = registry.findExecutable('chromium').executablePath();
config.set({
basePath: 'dist',
frameworks: ['mocha'],
client: {
mocha: {
ui: 'tdd',
timeout: 2000 * (process.env.CI === undefined ? 1 : 10),
},
},
files: [
{pattern: './*.js', included: true, watched: true, served: true, type: 'module'},
{pattern: './**/*', included: false, watched: true, served: true},
],
autoWatch: true,
browsers: ['ChromiumHeadlessNoSandbox', 'FirefoxHeadless'],
customLaunchers: {
ChromiumHeadlessNoSandbox: {
base: 'ChromiumHeadless',
flags: ['--no-sandbox'],
},
},
singleRun: false,
logLevel: config.LOG_ERROR,
});
};