Skip to content

Commit

Permalink
Throw an error object instead of a string (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhodgkins authored and eugef committed Oct 3, 2018
1 parent f90992e commit 1f5b313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mockResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function createResponse(options) {
mockResponse.writeHead = function(statusCode, statusMessage, headers) {

if (_endCalled) {
throw 'The end() method has already been called.';
throw new Error('The end() method has already been called.');
}

if (mockResponse.headersSent) {
Expand Down

0 comments on commit 1f5b313

Please sign in to comment.