]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/karma.conf.js
2 const os
= require("os");
3 const NodePolyfillPlugin
= require("node-polyfill-webpack-plugin");
5 if (os
.platform
=== "linux" && os
.arch() === "arm64") {
7 // For arm64 architecture, install chromium-browser using "apt-get install chromium-browser"
8 process
.env
.CHROME_BIN
= "/usr/bin/chromium-browser";
10 process
.env
.CHROME_BIN
= require("puppeteer").executablePath();
13 module
.exports = function(config
) {
16 // base path that will be used to resolve all patterns (eg. files, exclude)
19 // next three sections allow console.log to work
24 browserConsoleLogOptions
: {
31 * available frameworks: https://npmjs.org/browse/keyword/karma-adapter
33 frameworks
: ["mocha", "webpack"],
36 // list of files / patterns to load in the browser
38 "tests/lib/linter/linter.js"
42 // list of files to exclude
48 * preprocess matching files before serving them to the browser
49 * available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
52 "tests/lib/linter/linter.js": ["webpack"]
57 new NodePolyfillPlugin()
61 "../../../lib/linter$": "../../../build/eslint.js"
72 * test results reporter to use
73 * possible values: "dots", "progress"
74 * available reporters: https://npmjs.org/browse/keyword/karma-reporter
86 // enable / disable colors in the output (reporters and logs)
92 * possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
94 logLevel
: config
.LOG_INFO
,
97 // enable / disable watching file and executing tests whenever any file changes
102 * start these browsers
103 * available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
105 browsers
: ["HeadlessChrome"],
108 base
: "ChromeHeadless",
109 flags
: ["--no-sandbox"]
114 * Continuous Integration mode
115 * if true, Karma captures browsers, runs the tests and exits
121 * how many browser should be started simultaneous
123 concurrency
: Infinity