2018-01-08 10:02:44 +00:00
|
|
|
// configures browsers to run test against
|
|
|
|
// any of [ 'ChromeHeadless', 'Chrome', 'Firefox', 'IE', 'PhantomJS' ]
|
2021-01-06 11:04:20 +00:00
|
|
|
var browsers = (process.env.TEST_BROWSERS || 'ChromeHeadless').split(',');
|
2018-01-08 10:02:44 +00:00
|
|
|
|
2020-03-12 10:29:03 +00:00
|
|
|
// use puppeteer provided Chrome for testing
|
|
|
|
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
2018-01-08 10:02:44 +00:00
|
|
|
|
|
|
|
var VARIANT = process.env.VARIANT;
|
|
|
|
|
|
|
|
var NODE_ENV = process.env.NODE_ENV;
|
|
|
|
|
2020-03-12 10:29:03 +00:00
|
|
|
|
2018-01-08 10:02:44 +00:00
|
|
|
module.exports = function(karma) {
|
|
|
|
karma.set({
|
|
|
|
|
|
|
|
basePath: '../../',
|
|
|
|
|
|
|
|
frameworks: [
|
|
|
|
'mocha',
|
|
|
|
'sinon-chai'
|
|
|
|
],
|
|
|
|
|
|
|
|
files: [
|
2020-04-16 03:58:09 +00:00
|
|
|
'node_modules/promise-polyfill/dist/polyfill.js',
|
2018-01-28 19:55:52 +00:00
|
|
|
'dist/' + VARIANT + '.' + (NODE_ENV === 'production' ? 'production.min' : 'development') + '.js',
|
2018-01-08 10:02:44 +00:00
|
|
|
'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',
|
2018-01-28 19:55:52 +00:00
|
|
|
'test/distro/' + VARIANT + '.js'
|
2018-01-08 10:02:44 +00:00
|
|
|
],
|
|
|
|
|
2019-01-08 21:40:41 +00:00
|
|
|
reporters: [ 'progress' ],
|
2018-01-08 10:02:44 +00:00
|
|
|
|
2020-03-12 10:29:03 +00:00
|
|
|
browsers,
|
2018-01-08 10:02:44 +00:00
|
|
|
|
|
|
|
browserNoActivityTimeout: 30000,
|
|
|
|
|
|
|
|
singleRun: true,
|
|
|
|
autoWatch: false
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|