/** * Created by Srinivas R on 20-03-2017. */ process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { var buildDir = config.buildDir ? config.buildDir : 'build/app-full/'; var appJsPath = buildDir+'scripts/app/**/*.js'; var componentJsPath = buildDir+'components/**/*.js'; config.set({ browsers: ['ChromeHeadless'], customLaunchers: { ChromeHeadless: { base: 'Chrome', flags: [ '--headless', '--disable-gpu', '--no-sandbox', // Without a remote debugging port, Google Chrome exits immediately. '--remote-debugging-port=9222', '--js-flags="--max_old_space_size=4096"' ] } }, frameworks: ['jasmine', 'sinon'], browserNoActivityTimeout: 2000000, captureTimeout: 1000000, files: [ 'scripts/vendor/jquery-3.6.0/jquery.js', 'scripts/vendor/jquery-ui-1.13.1.custom/jquery-ui.js', 'scripts/vendor/angular-1.8.2/angular.js', 'scripts/vendor/angular-plugins/angular-cookies.js', 'scripts/vendor/angular-plugins/angular-resource.js', 'scripts/vendor/angular-plugins/angular-local-storage.js', 'scripts/vendor/angular-plugins/angular-sanitize.js', 'scripts/vendor/angular-plugins/ui-router.js', 'scripts/vendor/angular-plugins/ui-map.js', 'scripts/vendor/angular-plugins/ui-event.js', 'scripts/vendor/angular-plugins/ui-bootstrap-custom-tpls-2.5.0.js', 'scripts/vendor/angular-plugins/ui-bootstrap-tpls.js', 'scripts/vendor/angular-plugins/ui-bootstrap-custom.js', 'scripts/vendor/angular-plugins/ui-sortable.js', 'scripts/vendor/angular-plugins/angular-ellipsis.js', 'scripts/vendor/angular-plugins/angularjs-nvd3-directives.js', 'scripts/vendor/angular-plugins/bootstrap-colorpicker-module.js', 'scripts/vendor/ng-ckeditor/ng-ckeditor.js', 'scripts/vendor/angular-plugins/ng-grid-custom.js', 'scripts/vendor/jquery-plugins/jquery.iframe-transport.js', 'scripts/vendor/jquery-plugins/jquery.inputmask.bundle.js', 'scripts/vendor/jquery-plugins/jquery.cookie.js', 'scripts/vendor/jquery-plugins/bootstrap.tooltip.js', 'scripts/vendor/jquery-plugins/bootstrap.popover.js', 'scripts/vendor/moment-2.29.4/moment-with-langs.js', 'scripts/vendor/moment-2.29.4/moment-timezone-with-data-0.5.40.js', 'scripts/vendor/lodash-4.17.21/lodash.js', 'scripts/vendor/d3-3.4.8/d3.js', 'scripts/vendor/nvd3-1.1.15b/nvd3.js', 'scripts/vendor/x2js/xml2json.js', 'scripts/vendor/strophe/strophe.js', 'scripts/vendor/strophe-plugins/strophe.ping.js', 'scripts/vendor/strophe-plugins/strophe.xdomainrequest.js', 'scripts/vendor/strophe-plugins/strophe.disco.js', 'scripts/vendor/strophe-plugins/strophe.muc.js', 'scripts/vendor/strophe-plugins/strophe.x.js', 'scripts/vendor/strophe-plugins/strophe.cm.js', 'scripts/vendor/daypilot-8.0.3413/Common.js', 'scripts/vendor/daypilot-8.0.3413/Bubble.src.js', 'scripts/vendor/daypilot-8.0.3413/Calendar.src.js', 'scripts/vendor/daypilot-8.0.3413/Datepicker.src.js', 'scripts/vendor/daypilot-8.0.3413/Gantt.src.js', 'scripts/vendor/daypilot-8.0.3413/Menu.src.js', 'scripts/vendor/daypilot-8.0.3413/Month.src.js', 'scripts/vendor/daypilot-8.0.3413/Navigator.src.js', 'scripts/vendor/daypilot-8.0.3413/Scheduler.src.js', 'scripts/vendor/dagre-0.8.5/dagre.js', 'scripts/vendor/cytoscape.js/cytoscape-3.21.3.umd.js', 'scripts/vendor/cytoscape-dagre-2.3.2/cytoscape-dagre.js', 'scripts/vendor/autolinker/autolinker.js', 'scripts/vendor/qtip-2.2.1/jquery.qtip.js', 'scripts/vendor/jsep-0.3.1/jsep.js', buildDir+'scripts/app/*.js', buildDir+'scripts/app/common/vo/base-vo.js', buildDir+'scripts/app/common/vo/entity-vo.js', buildDir+'scripts/app/common/vo/*.js', buildDir+'scripts/app/**/*.js', buildDir+'components/**/*.js', 'scripts/ckeditor/ckeditor.js', 'node_modules/angular-mocks/angular-mocks.js', 'node_modules/karma-read-json/karma-read-json.js', 'scripts/app/i18n-custom/angular-custom-locale_en.js', 'views/**/*.html', 'components/**/*.html', 'test/**/*.spec.js', { pattern: 'mocks/*.json', watched: true, served: true, included: false }, { pattern: 'scripts/app/i18n/*.json', watched: true, served: true, included: false } ], // coverage reporter generates the coverage // reporters: ['spec', 'progress', 'coverage'], reporters: ['progress', 'coverage'], preprocessors: { // source files, that you wanna generate coverage for // do not include tests or libraries // (these files will be instrumented by Istanbul) [appJsPath]: ['coverage'], [componentJsPath]: ['coverage'], 'views/**/*.html': 'ng-html2js', 'components/**/*.html': 'ng-html2js', }, ngHtml2JsPreprocessor: { moduleName: 'templates' }, plugins: [ 'karma-jasmine', 'karma-chrome-launcher', 'karma-coverage', 'karma-ng-html2js-preprocessor', 'karma-sinon', 'karma-spec-reporter' ], // optionally, configure the reporter coverageReporter: { dir: 'coverage/', reporters: [{type: 'lcov', subdir: 'reports'}] } }); };