SmartIT_Extensions/BMC/smart-it-full/karma.conf.js

123 lines
4.8 KiB
JavaScript

/**
* Created by Srinivas R on 20-03-2017.
*/
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function (config) {
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-2.2.4/jquery.js',
'scripts/vendor/jquery-ui-1.10.4.custom/jquery-ui.js',
'scripts/vendor/angular-1.4.14/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.8.3/moment-with-langs.js',
'scripts/vendor/lodash-3.9.3/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/pdfjs/compatibility.js',
'scripts/vendor/pdfjs/pdf.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.7.4/dagre.js',
'scripts/vendor/cytoscape.js-2.4.6/cytoscape.js',
'scripts/vendor/qtip-2.2.1/jquery.qtip.js',
'scripts/vendor/jsep-0.3.1/jsep.js',
'build/app-full/scripts/app/*.js',
'build/app-full/scripts/app/common/vo/base-vo.js',
'build/app-full/scripts/app/common/vo/entity-vo.js',
'build/app-full/scripts/app/common/vo/*.js',
'build/app-full/scripts/app/**/*.js',
'build/app-full/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)
'build/app-full/scripts/app/**/*.js': ['coverage'],
'build/app-full/components/**/*.js': ['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'}]
}
});
};