mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-04-23 22:30:37 +00:00
61 lines
2.1 KiB
JavaScript
61 lines
2.1 KiB
JavaScript
// 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');
|
|
|
|
module.exports = function (config) {
|
|
config.set({
|
|
basePath: '',
|
|
files: [
|
|
{ pattern: '../../node_modules/pdfjs-dist/build/pdf.min.mjs', type: 'module', included: true, watched: false },
|
|
{ pattern: '../../node_modules/pdfjs-dist/build/pdf.worker.min.mjs', type: 'module', included: true, watched: false }
|
|
],
|
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
plugins: [
|
|
require('karma-jasmine'),
|
|
require('karma-chrome-launcher'),
|
|
require('karma-jasmine-html-reporter'),
|
|
require('karma-coverage'),
|
|
require('@angular-devkit/build-angular/plugins/karma'),
|
|
require('karma-mocha-reporter')
|
|
],
|
|
client: {
|
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
},
|
|
jasmineHtmlReporter: {
|
|
suppressAll: true // removes the duplicated traces
|
|
},
|
|
mochaReporter: {
|
|
ignoreSkipped: process.env.KARMA_IGNORE_SKIPPED === 'true'
|
|
},
|
|
|
|
coverageReporter: {
|
|
dir: join(__dirname, '../../coverage/extensions'),
|
|
subdir: '.',
|
|
reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'text-summary', subdir: '.', file: 'summary.txt' }],
|
|
check: {
|
|
global: {
|
|
statements: 75,
|
|
branches: 65,
|
|
functions: 73,
|
|
lines: 75
|
|
}
|
|
}
|
|
},
|
|
reporters: ['mocha', 'kjhtml'],
|
|
port: 9876,
|
|
colors: true,
|
|
logLevel: constants.LOG_INFO,
|
|
autoWatch: true,
|
|
browsers: ['ChromeHeadless'],
|
|
customLaunchers: {
|
|
ChromeHeadless: {
|
|
base: 'Chrome',
|
|
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']
|
|
}
|
|
},
|
|
singleRun: true
|
|
});
|
|
};
|