.eslintrc.js |
/*.js", "test/unit/* |
5781 |
bin |
|
|
common |
|
|
content-src |
|
|
css |
|
|
data |
|
|
docs |
|
|
jar.mn |
|
1224 |
karma.mc.config.js |
/*.js",
// The base directory of all source files (used for path resolution in webpack importing)
moduleResolveDirectory: __dirname,
// a RegEx matching all Cu.import statements of local files
resourcePathRegEx: /^resource:\/\/activity-stream\//,
coverageReportingPath: "logs/coverage/",
};
// When tweaking here, be sure to review the docs about the execution ordering
// semantics of the preprocessors array, as they are somewhat odd.
const preprocessors = {};
preprocessors[PATHS.testFilesPattern] = [
"webpack", // require("karma-webpack")
"sourcemap", // require("karma-sourcemap-loader")
];
module.exports = function (config) {
const isTDD = config.tdd;
const browsers = isTDD ? ["Firefox"] : ["FirefoxHeadless"]; // require("karma-firefox-launcher")
config.set({
singleRun: !isTDD,
browsers,
customLaunchers: {
FirefoxHeadless: {
base: "Firefox",
flags: ["--headless"],
},
},
frameworks: [
"chai", // require("chai") require("karma-chai")
"mocha", // require("mocha") require("karma-mocha")
"sinon", // require("sinon") require("karma-sinon")
],
reporters: [
"coverage-istanbul", // require("karma-coverage")
"mocha", // require("karma-mocha-reporter")
// for bin/try-runner.js to parse the output easily
"json", // require("karma-json-reporter")
],
jsonReporter: {
// So this doesn't get interleaved with other karma output
stdout: false,
outputFile: path.join("logs", "karma-run-results.json"),
},
coverageIstanbulReporter: {
reports: ["lcov", "text-summary"], // for some reason "lcov" reallys means "lcov" and "html"
"report-config": {
// so the full m-c path gets printed; needed for https://coverage.moz.tools/ integration
lcov: {
projectRoot: "../../..",
},
},
dir: PATHS.coverageReportingPath,
// This will make karma fail if coverage reporting is less than the minimums here
thresholds: !isTDD && {
each: {
statements: 100,
lines: 100,
functions: 100,
branches: 66,
overrides: {
"lib/AboutPreferences.sys.mjs": {
statements: 98,
lines: 98,
functions: 94,
branches: 66,
},
/**
TelemetryFeed.sys.mjs is tested via an xpcshell test
|
12285 |
lib |
|
|
moz.build |
|
597 |
package-lock.json |
|
469651 |
package.json |
|
4102 |
prerendered |
|
|
test |
|
|
webpack.system-addon.config.js |
|
2100 |
yamscripts.yml |
|
2423 |