2017-04-04 16:51:30 +02:00
|
|
|
var webpack = require("webpack");
|
|
|
|
var WebpackDevServer = require("webpack-dev-server");
|
2017-11-07 19:13:06 +01:00
|
|
|
var webpackConfig = require("./webpack.production.config");
|
2017-04-04 17:03:02 +02:00
|
|
|
var testConfig = require("../test/config/specs");
|
2017-04-04 16:51:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
var server;
|
|
|
|
|
|
|
|
exports.config = {
|
2017-04-04 17:03:02 +02:00
|
|
|
specs: [
|
|
|
|
'./test/specs/**/*.js'
|
|
|
|
],
|
|
|
|
exclude: [
|
|
|
|
],
|
|
|
|
maxInstances: 10,
|
|
|
|
capabilities: [{
|
|
|
|
maxInstances: 5,
|
|
|
|
browserName: 'firefox'
|
|
|
|
}],
|
|
|
|
sync: true,
|
2017-11-07 19:13:06 +01:00
|
|
|
logLevel: 'verbose',
|
2017-04-04 17:03:02 +02:00
|
|
|
coloredLogs: true,
|
|
|
|
bail: 0,
|
|
|
|
screenshotPath: './errorShots/',
|
|
|
|
baseUrl: 'http://localhost',
|
|
|
|
waitforTimeout: 10000,
|
|
|
|
connectionRetryTimeout: 90000,
|
|
|
|
connectionRetryCount: 3,
|
|
|
|
services: ['phantomjs'],
|
|
|
|
framework: 'mocha',
|
|
|
|
reporters: ['spec'],
|
2017-11-15 15:29:56 +01:00
|
|
|
phantomjsOpts: {
|
|
|
|
webdriverLogfile: 'phantomjs.log'
|
|
|
|
},
|
2017-04-04 17:03:02 +02:00
|
|
|
mochaOpts: {
|
|
|
|
ui: 'bdd',
|
|
|
|
// Because we don't know how long the initial build will take...
|
|
|
|
timeout: 2*60*1000
|
|
|
|
},
|
|
|
|
onPrepare: function (config, capabilities) {
|
|
|
|
var compiler = webpack(webpackConfig);
|
2017-11-07 19:13:06 +01:00
|
|
|
server = new WebpackDevServer(compiler, {});
|
2017-04-04 17:03:02 +02:00
|
|
|
server.listen(testConfig.port);
|
|
|
|
},
|
|
|
|
onComplete: function(exitCode) {
|
|
|
|
server.close();
|
|
|
|
}
|
2017-04-04 16:51:30 +02:00
|
|
|
}
|