Comparing version 0.0.1 to 0.0.2
@@ -133,2 +133,14 @@ // Load modules | ||
internals.Error.clientTimeout = function (message) { | ||
return new internals.Error(408, message); | ||
}; | ||
internals.Error.serverTimeout = function (message) { | ||
return new internals.Error(503, message); | ||
}; | ||
internals.Error.forbidden = function (message) { | ||
@@ -135,0 +147,0 @@ |
{ | ||
"name": "boom", | ||
"description": "HTTP-friendly error objects", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors": [], |
boom | ||
==== | ||
HTTP-friendly error objects | ||
HTTP-friendly error objects | ||
[![Build Status](https://secure.travis-ci.org/hueniverse/boom.png)](http://travis-ci.org/hueniverse/boom) |
@@ -89,2 +89,32 @@ // Load modules | ||
describe('#clientTimeout', function () { | ||
it('returns a 408 error code', function (done) { | ||
expect(Boom.clientTimeout().code).to.equal(408); | ||
done(); | ||
}); | ||
it('sets the message with the passed in message', function (done) { | ||
expect(Boom.clientTimeout('my message').message).to.equal('my message'); | ||
done(); | ||
}); | ||
}); | ||
describe('#serverTimeout', function () { | ||
it('returns a 503 error code', function (done) { | ||
expect(Boom.serverTimeout().code).to.equal(503); | ||
done(); | ||
}); | ||
it('sets the message with the passed in message', function (done) { | ||
expect(Boom.serverTimeout('my message').message).to.equal('my message'); | ||
done(); | ||
}); | ||
}); | ||
describe('#forbidden', function () { | ||
@@ -91,0 +121,0 @@ |
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
13743
266
7