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

healthchecks

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

healthchecks - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## Version 1.2.4 2015-02-11
ADDED show request time on page
## Version 1.2.3 2015-01-19

@@ -2,0 +7,0 @@

9

lib/healthchecks.js

@@ -83,4 +83,5 @@ // Exports an Express middleware factory.

// Represents a check outcome with the properties url, reason, etc.
function Outcome(url, expected, error, response, body) {
this.url = url;
function Outcome(url, expected, error, response, body, elapsed) {
this.url = url;
this.elapsed = elapsed;
if (error) {

@@ -154,5 +155,7 @@

};
const start = Date.now();
request(params, function(error, response, body) {
const outcome = new Outcome(absoluteURL, expected, error, response, body);
const elapsed = Date.now() - start;
const outcome = new Outcome(absoluteURL, expected, error, response, body, elapsed);
resolve(outcome);

@@ -159,0 +162,0 @@

{
"name": "healthchecks",
"version": "1.2.3",
"version": "1.2.4",
"scripts": {
"test": "mocha"
},
"engines": {
"node": "0.10.x"
},
"main": "lib/healthchecks",

@@ -14,4 +11,4 @@ "dependencies": {

"debug": "^2.0",
"handlebars": "^2.0",
"lodash": "^2.0",
"handlebars": "^3.0",
"lodash": "^3.1",
"ms": "^0.7.0",

@@ -18,0 +15,0 @@ "request": "^2.0"

@@ -22,6 +22,6 @@ const Browser = require('zombie');

browser.assert.text('h1', 'Passed');
browser.assert.text('.passed li:nth-of-type(1)', 'http://localhost:3000/error');
browser.assert.text('.passed li:nth-of-type(2)', 'http://localhost:3000/expected');
browser.assert.text('.passed li:nth-of-type(3)', 'http://localhost:3000/status');
browser.assert.text('.passed li:nth-of-type(4)', 'http://localhost:3000/timeout');
browser.assert.text('.passed li:nth-of-type(1)', /http:\/\/localhost:3000\/error \d+ms/);
browser.assert.text('.passed li:nth-of-type(2)', /http:\/\/localhost:3000\/expected \d+ms/);
browser.assert.text('.passed li:nth-of-type(3)', /http:\/\/localhost:3000\/status \d+ms/);
browser.assert.text('.passed li:nth-of-type(4)', /http:\/\/localhost:3000\/timeout \d+ms/);
done();

@@ -42,3 +42,3 @@ });

browser.assert.elements('.failed li', 1);
browser.assert.text('.failed li:nth-of-type(1)', 'http://localhost:3000/error => socket hang up');
browser.assert.text('.failed li:nth-of-type(1)', /http:\/\/localhost:3000\/error => socket hang up \d+ms/);
browser.assert.elements('.passed li', 3);

@@ -66,3 +66,3 @@ done();

browser.assert.elements('.failed li', 1);
browser.assert.text('.failed li:nth-of-type(1)', 'http://localhost:3000/timeout => timeout');
browser.assert.text('.failed li:nth-of-type(1)', /http:\/\/localhost:3000\/timeout => timeout \d+ms/);
browser.assert.elements('.passed li', 3);

@@ -88,3 +88,3 @@ done();

browser.assert.elements('.failed li', 1);
browser.assert.text('.failed li:nth-of-type(1)', 'http://localhost:3000/status => 400');
browser.assert.text('.failed li:nth-of-type(1)', /http:\/\/localhost:3000\/status => 400 \d+ms/);
browser.assert.elements('.passed li', 3);

@@ -110,3 +110,3 @@ done();

browser.assert.elements('.failed li', 1);
browser.assert.text('.failed li:nth-of-type(1)', 'http://localhost:3000/expected => body');
browser.assert.text('.failed li:nth-of-type(1)', /http:\/\/localhost:3000\/expected => body \d+ms/);
browser.assert.elements('.passed li', 3);

@@ -113,0 +113,0 @@ done();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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