Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

baseline

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baseline - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

4

lib/baseline.d.ts

@@ -18,6 +18,2 @@ interface Callback {

skip(title: string, action: (done?: Callback) => void): void;
loop: {
(title: string, action?: (count: number, done?: Callback) => void): void;
skip(title: string, action: (count: number, done?: Callback) => void): void;
}
}

@@ -24,0 +20,0 @@

26

lib/baseline.js

@@ -9,3 +9,2 @@ /// <reference path="./types.d.ts" />

var Test = require("./test");
var ManualTest = require("./manualTest");
var Evaluator = require("./evaluator");

@@ -70,2 +69,3 @@ var NodeTimer = require("./nodeTimer");

Baseline.prototype._createGlobals = function (context) {
var _this = this;
var suites = [this._suite];

@@ -96,13 +96,12 @@ context.suite = function (title, block) {

context.test = function (title, action) {
return addTest(new Test(title, action));
var test = new Test(title, action);
suites[0].addTest(test);
test.timeout = _this.timeout;
return test;
};
context.test.skip = function (title, action) {
return skipTest(context.test(title, action));
var test = global.test(title, action);
test.pending = true;
return test;
};
context.test.loop = function (title, action) {
return addTest(new ManualTest(title, action));
};
context.test.loop.skip = function (title, action) {
return skipTest(context.test.loop(title, action));
};
context.after = function (action) {

@@ -120,11 +119,2 @@ suites[0].addAfter(action);

};
function addTest(test) {
suites[0].addTest(test);
test.timeout = this.timeout;
return test;
}
function skipTest(test) {
test.pending = true;
return test;
}
};

@@ -131,0 +121,0 @@ Baseline.DefaultReporter = DefaultReporter;

@@ -28,5 +28,2 @@ /// <reference path="./types.d.ts" />

ret._results = JSON.parse(data);
if (ret._results.type === undefined) {
ret._results.type = "hz";
}
callback(null, ret);

@@ -45,5 +42,5 @@ });

Results.prototype.getBaselineHz = function (test) {
return this._findValue(this._getPath(test));
return this._findHz(this._getPath(test));
};
Results.prototype._findValue = function (path) {
Results.prototype._findHz = function (path) {
var results = this._results;

@@ -70,5 +67,3 @@ for (var i = 0, l = path.length - 1; i < l; i++) {

Results._getSuiteResults = function (suite) {
var results = {
type: "sample"
};
var results = {};
if (suite.tests.length > 0) {

@@ -75,0 +70,0 @@ results.tests = {};

@@ -9,3 +9,3 @@ /// <reference path="./types.d.ts" />

if (action) {
this.async = action.length > 0;
this.async = !!action.length;
}

@@ -12,0 +12,0 @@ }

@@ -71,3 +71,3 @@ /*!

}
// Reject the null hypothesis the two samples come from the
// Reject the null hyphothesis the two samples come from the
// same population (i.e. have the same median) if...

@@ -74,0 +74,0 @@ if (size1 + size2 > 30) {

{
"name": "baseline",
"description": "A benchmarking library that allows performance to be compared to an established baseline.",
"version": "0.1.7",
"version": "0.1.8",
"author": {

@@ -6,0 +6,0 @@ "name": "Artifact Health, LLC",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc