healthchecks
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31712
594
+ Addedalign-text@0.1.4(transitive)
+ Addedcamelcase@1.2.1(transitive)
+ Addedcenter-align@0.1.3(transitive)
+ Addedcliui@2.1.0(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addedhandlebars@3.0.8(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedkind-of@3.2.2(transitive)
+ Addedlazy-cache@1.0.4(transitive)
+ Addedlodash@3.10.1(transitive)
+ Addedlongest@1.0.1(transitive)
+ Addedminimist@0.0.10(transitive)
+ Addedoptimist@0.6.1(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedright-align@0.1.3(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addeduglify-js@2.8.29(transitive)
+ Addeduglify-to-browserify@1.0.2(transitive)
+ Addedwindow-size@0.1.0(transitive)
+ Addedwordwrap@0.0.2(transitive)
+ Addedyargs@3.10.0(transitive)
- Removedasync@0.2.10(transitive)
- Removedhandlebars@2.0.0(transitive)
- Removedlodash@2.4.2(transitive)
- Removedoptimist@0.3.7(transitive)
- Removeduglify-js@2.3.6(transitive)
Updatedhandlebars@^3.0
Updatedlodash@^3.1