2020-01-14 12:14:18 -06:00
|
|
|
/* global require */
|
2020-01-14 11:08:51 -06:00
|
|
|
|
2020-05-18 15:23:50 -05:00
|
|
|
var process = require('process');
|
2020-01-14 12:14:18 -06:00
|
|
|
var tasks = require('./tasks');
|
2020-01-14 11:08:51 -06:00
|
|
|
|
2020-01-14 12:14:18 -06:00
|
|
|
function plugin(on, config) {
|
|
|
|
on('task', {
|
2020-03-13 07:47:15 -05:00
|
|
|
copyFile: tasks.copyFile,
|
|
|
|
failed: require('cypress-failed-log/src/failed')()
|
2020-01-14 12:14:18 -06:00
|
|
|
});
|
|
|
|
|
2020-05-18 15:23:50 -05:00
|
|
|
on('before:browser:launch', function(browser, launchOptions) {
|
|
|
|
if (browser.family === 'chromium' && process.env.ENABLE_LOGGING) {
|
|
|
|
launchOptions.args.push('--enable-logging=stderr');
|
|
|
|
launchOptions.args.push('--v=2');
|
|
|
|
return launchOptions;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2020-01-14 12:14:18 -06:00
|
|
|
return config;
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = plugin;
|