Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const config = require('./../lib/config');
const benchpress = require('@angular/benchpress');
const fs = require('fs-extra');
const path = require('path');
const HOT_VERSION = process.env.HOT_VERSION;
const bindings = [
benchpress.SeleniumWebDriverAdapter.PROTRACTOR_PROVIDERS,
// { provide: benchpress.Options.FORCE_GC, useValue: true },
{ provide: benchpress.RegressionSlopeValidator.SAMPLE_SIZE, useValue: config.SAMPLE_SIZE },
benchpress.JsonFileReporter.PROVIDERS,
benchpress.MultiReporter.provideWith([
benchpress.ConsoleReporter,
benchpress.JsonFileReporter
]),
];
benchpress.Options.DEFAULT_PROVIDERS.push({
provide: benchpress.Options.WRITE_FILE,
useValue: (filename, content) => void process.send(content),
});
const runner = new benchpress.Runner(bindings);
exports.runSample = async function(config) {
config.providers = [{
provide: benchpress.Options.SAMPLE_DESCRIPTION,
const config = require('./../lib/config');
const benchpress = require('@angular/benchpress');
const fs = require('fs-extra');
const path = require('path');
const HOT_VERSION = process.env.HOT_VERSION;
const bindings = [
benchpress.SeleniumWebDriverAdapter.PROTRACTOR_PROVIDERS,
// { provide: benchpress.Options.FORCE_GC, useValue: true },
{ provide: benchpress.RegressionSlopeValidator.SAMPLE_SIZE, useValue: config.SAMPLE_SIZE },
benchpress.JsonFileReporter.PROVIDERS,
benchpress.MultiReporter.provideWith([
benchpress.ConsoleReporter,
benchpress.JsonFileReporter
]),
];
benchpress.Options.DEFAULT_PROVIDERS.push({
provide: benchpress.Options.WRITE_FILE,
useValue: (filename, content) => void process.send(content),
});
const runner = new benchpress.Runner(bindings);
exports.runSample = async function(config) {
config.providers = [{
provide: benchpress.Options.SAMPLE_DESCRIPTION,
useValue: { hotVersion: HOT_VERSION }
}];