mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* AAE-30877 squash-merged improvement/AAE-30877-update-package-pdfjs-dist * AAE-30877 statically import pdf_viewer * AAE-30877 fix failing worker load * AAE-22975 attempt without excessive logs * AAE-22975 remove pdf_viewer from karma includes * AAE-22975 remove incorrect firstValueFrom * AAE-22975 await rendered event callback * AAE-22975 change pdf mock code * AAE-22975 change pdf mock code * AAE-22975 mock pdfjs-dist package in tests to improve performance * AAE-22975 fix pagesLoaded test * AAE-22975 fix insights tests * AAE-22975 un-focus pdf-viewer tests, remove logs * AAE-22975 add defer block * AAE-22975 add pdfjsLib injection token * AAE-22975 remove defer block * AAE-22975 change pdfjs import path * AAE-22975 change pdfjsviewer import path * AAE-22975 limit usage of direct PDFViewer * AAE-22975 cleanup
88 lines
3.6 KiB
JavaScript
88 lines
3.6 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/@angular/material/prebuilt-themes/indigo-pink.css',
|
|
included: true,
|
|
watched: false
|
|
},
|
|
{ pattern: 'node_modules/raphael/raphael.min.js', included: true, watched: false },
|
|
{ pattern: 'lib/core/src/lib/i18n/**/en.json', included: false, served: true, watched: false },
|
|
{ pattern: 'lib/process-services-cloud/src/lib/i18n/*.json', included: false, served: true, watched: false },
|
|
{ pattern: 'lib/process-services-cloud/src/lib/mock/*.json', included: false, served: true, watched: false },
|
|
{ pattern: 'lib/process-services-cloud/**/*.ts', included: false, served: true, watched: false },
|
|
{ pattern: 'lib/config/app.config.json', included: false, served: true, watched: false }
|
|
],
|
|
frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'],
|
|
proxies: {
|
|
'/assets/': '/base/lib/process-services-cloud/src/lib/assets/',
|
|
'/resources/i18n/en.json': '/base/lib/process-services-cloud/src/lib/mock/en.json',
|
|
'/resources/i18n/fr.json': '/base/lib/process-services-cloud/src/lib/mock/fr.json',
|
|
'/base/assets/': '/base/lib/process-services/assets/',
|
|
'/assets/adf-core/i18n/en.json': '/base/lib/core/src/lib/i18n/en.json',
|
|
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
|
'/assets/adf-process-services-cloud/i18n/en.json': '/base/lib/process-services-cloud/lib/i18n/en.json',
|
|
'/assets/adf-process-services-cloud/i18n/en-GB.json': '/base/lib/process-services-cloud/lib/i18n/en.json',
|
|
'/app.config.json': '/base/lib/config/app.config.json'
|
|
},
|
|
plugins: [
|
|
require('karma-jasmine-ajax'),
|
|
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,
|
|
jasmine: {
|
|
random: false
|
|
}
|
|
},
|
|
jasmineHtmlReporter: {
|
|
suppressAll: true // removes the duplicated traces
|
|
},
|
|
mochaReporter: {
|
|
ignoreSkipped: process.env.KARMA_IGNORE_SKIPPED === 'true'
|
|
},
|
|
|
|
coverageReporter: {
|
|
dir: join(__dirname, './coverage/process-service-cloud'),
|
|
subdir: '.',
|
|
reporters: [{ type: 'html' }, { type: 'text-summary' }],
|
|
check: {
|
|
global: {
|
|
statements: 75,
|
|
branches: 67,
|
|
functions: 73,
|
|
lines: 75
|
|
}
|
|
}
|
|
},
|
|
|
|
customLaunchers: {
|
|
ChromeHeadless: {
|
|
base: 'Chrome',
|
|
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']
|
|
}
|
|
},
|
|
|
|
reporters: ['mocha', 'kjhtml'],
|
|
port: 9876,
|
|
colors: true,
|
|
logLevel: constants.LOG_INFO,
|
|
autoWatch: true,
|
|
browsers: ['ChromeHeadless'],
|
|
singleRun: true
|
|
});
|
|
process.env.TZ = 'UTC';
|
|
};
|