Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logDir: config.run.absResultDir,
waitScript: config.waitScript,
customScripts: config.customScripts,
seleniumServer: config.seleniumServer,
useProxy: true
};
if (config.btConfig) {
Object.keys(config.btConfig).forEach(function(key) {
btConfig[key] = config.btConfig[key];
});
}
log.log('info', 'Running browsertime for ' + browser + ' ' + url);
browsers.setProxy(proxy);
var bt = new Browsertime(browsers);
browserListenerProxy.setup(bt, proxy, btConfig);
bt.fetch(btConfig, function(err) {
if (err) {
return callback(err);
}
fs.readFile(measurementFile, function(err2, btData) {
if (err2) {
log.log('error', 'Couldn\'t read the file:' + measurementFile);
return callback(err2);
}
// TODO we should only read the HAR if we ask for one