New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.6 to 0.1.7

lib/manualTest.js

4

lib/baseline.d.ts

@@ -18,2 +18,6 @@ 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;
}
}

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

26

lib/baseline.js

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

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

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

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

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

context.test = function (title, action) {
var test = new Test(title, action);
suites[0].addTest(test);
test.timeout = _this.timeout;
return test;
return addTest(new Test(title, action));
};
context.test.skip = function (title, action) {
var test = global.test(title, action);
test.pending = true;
return test;
return skipTest(context.test(title, action));
};
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) {

@@ -119,2 +120,11 @@ 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;
}
};

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

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

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

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

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

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

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

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

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

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

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

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

}
// Reject the null hyphothesis the two samples come from the
// Reject the null hypothesis 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.6",
"version": "0.1.7",
"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