diff --git a/.vscode/settings.json b/.vscode/settings.json index 0922378677..3d46574011 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,6 @@ "**/.svn": true, "**/.hg": true, "**/.DS_Store": true, - "**/coverage": true, "**/.happypack": true }, "markdownlint.config": { diff --git a/lib/content-services/karma.conf.js b/lib/content-services/karma.conf.js index be189b9175..75a1efcc33 100644 --- a/lib/content-services/karma.conf.js +++ b/lib/content-services/karma.conf.js @@ -66,9 +66,9 @@ module.exports = function (config) { }, coverageReporter: { - dir: join(__dirname, './coverage/content-services'), + dir: join(__dirname, '../../coverage/content-services'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }], check: { global: { statements: 75, diff --git a/lib/core/karma.conf.js b/lib/core/karma.conf.js index 99206d0b9a..69aa8093f4 100644 --- a/lib/core/karma.conf.js +++ b/lib/core/karma.conf.js @@ -78,9 +78,9 @@ module.exports = function (config) { }, coverageReporter: { - dir: join(__dirname, './coverage/core'), + dir: join(__dirname, '../../coverage/core'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }], check: { global: { statements: 75, diff --git a/lib/extensions/karma.conf.js b/lib/extensions/karma.conf.js index 7fe57dbb02..d9339acbf9 100644 --- a/lib/extensions/karma.conf.js +++ b/lib/extensions/karma.conf.js @@ -1,7 +1,8 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -const {join} = require('path'); -const {constants} = require('karma'); +/* eslint-env es6 */ +const { join } = require('path'); +const { constants } = require('karma'); module.exports = function (config) { config.set({ @@ -19,16 +20,16 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { - suppressAll: true, // removes the duplicated traces + suppressAll: true // removes the duplicated traces }, mochaReporter: { - ignoreSkipped: process.env?.KARMA_IGNORE_SKIPPED === 'true' + ignoreSkipped: process.env.KARMA_IGNORE_SKIPPED === 'true' }, coverageReporter: { - dir: join(__dirname, './coverage/extensions'), + dir: join(__dirname, '../../coverage/extensions'), subdir: '.', - reporters: [{type: 'html'}, {type: 'text-summary'}], + reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }], check: { global: { statements: 75, @@ -47,12 +48,7 @@ module.exports = function (config) { customLaunchers: { ChromeHeadless: { base: 'Chrome', - flags: [ - '--no-sandbox', - '--headless', - '--disable-gpu', - '--remote-debugging-port=9222' - ] + flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222'] } }, singleRun: true diff --git a/lib/insights/karma.conf.js b/lib/insights/karma.conf.js index 1bbe0f2ba0..2fbff253b2 100644 --- a/lib/insights/karma.conf.js +++ b/lib/insights/karma.conf.js @@ -1,5 +1,6 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html +/* eslint-env es6 */ const { join } = require('path'); const { constants } = require('karma'); @@ -49,13 +50,13 @@ module.exports = function (config) { }, mochaReporter: { - ignoreSkipped: process.env?.KARMA_IGNORE_SKIPPED === 'true' + ignoreSkipped: process.env.KARMA_IGNORE_SKIPPED === 'true' }, coverageReporter: { - dir: join(__dirname, './coverage/insights'), + dir: join(__dirname, '../../coverage/insights'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }], check: { global: { statements: 75, diff --git a/lib/js-api/jest.config.ts b/lib/js-api/jest.config.ts index f175a0518a..b29e31ba11 100644 --- a/lib/js-api/jest.config.ts +++ b/lib/js-api/jest.config.ts @@ -4,7 +4,9 @@ export default { preset: '../../jest.preset.js', testEnvironment: 'jsdom', setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/libs/js-api', + collectCoverage: true, + coverageReporters: ['html', ['text-summary', { file: 'summary.txt' }], 'text-summary'], + coverageDirectory: '../../coverage/js-api', moduleNameMapper: { '^pdfjs-dist$': 'pdfjs-dist/legacy/build/pdf' }, diff --git a/lib/process-services-cloud/karma.conf.js b/lib/process-services-cloud/karma.conf.js index ee47e3c85c..4901b19061 100644 --- a/lib/process-services-cloud/karma.conf.js +++ b/lib/process-services-cloud/karma.conf.js @@ -55,9 +55,9 @@ module.exports = function (config) { }, coverageReporter: { - dir: join(__dirname, './coverage/process-service-cloud'), + dir: join(__dirname, '../../coverage/process-services-cloud'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }], check: { global: { statements: 75, diff --git a/lib/process-services/karma.conf.js b/lib/process-services/karma.conf.js index 1810c04c53..fc8ca92c5e 100644 --- a/lib/process-services/karma.conf.js +++ b/lib/process-services/karma.conf.js @@ -50,9 +50,9 @@ module.exports = function (config) { ignoreSkipped: process.env.KARMA_IGNORE_SKIPPED === 'true' }, coverageReporter: { - dir: join(__dirname, './coverage/process-services'), + dir: join(__dirname, '../../coverage/process-services'), subdir: '.', - reporters: [{ type: 'html' }, { type: 'text-summary' }], + reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }], check: { global: { statements: 75,