bpmn-js/test/config/karma.distro.js

45 lines
1.1 KiB
JavaScript
Raw Normal View History

// configures browsers to run test against
// any of [ 'ChromeHeadless', 'Chrome', 'Firefox', 'IE', 'PhantomJS' ]
var browsers = (process.env.TEST_BROWSERS || 'ChromeHeadless').split(',');
2020-03-12 10:29:03 +00:00
// use puppeteer provided Chrome for testing
process.env.CHROME_BIN = require('puppeteer').executablePath();
var VARIANT = process.env.VARIANT;
var NODE_ENV = process.env.NODE_ENV;
2020-03-12 10:29:03 +00:00
module.exports = function(karma) {
karma.set({
basePath: '../../',
frameworks: [
'mocha',
'sinon-chai'
],
files: [
'node_modules/promise-polyfill/dist/polyfill.js',
'dist/' + VARIANT + '.' + (NODE_ENV === 'production' ? 'production.min' : 'development') + '.js',
'dist/assets/bpmn-font/css/bpmn.css',
'dist/assets/diagram-js.css',
{ pattern: 'resources/initial.bpmn', included: false },
{ pattern: 'dist/assets/**/*', included: false },
'test/distro/helper.js',
'test/distro/' + VARIANT + '.js'
],
reporters: [ 'progress' ],
2020-03-12 10:29:03 +00:00
browsers,
browserNoActivityTimeout: 30000,
singleRun: true,
autoWatch: false
});
};