Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Benchmark from 'benchmark';
import { implementations, lookupFeature } from './config/implementations';
import { group, groupEnd, log } from './polyfills';
import tests from './config/tests';
// JDD will be making this change for 2.0
Benchmark.Deferred.prototype.end = Benchmark.Deferred.prototype.resolve;
var distributions = [1, 2, 10, 50, 100, 1000, 10000];
var runs = [];
function runRest() {
if (runs.length > 0) {
runs.shift().run({
async: true
});
}
}
export function run(customTestPatterns, customImplementations, customIterations) {
tests.forEach(function(testObj) {
var prefix = typeof process === 'object' ? './tests/' : '';
var test = require(prefix + testObj).test;
var fn = test.run;