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

node-mocks-http

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-mocks-http - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

4

lib/mockResponse.js

@@ -245,2 +245,6 @@ 'use strict';

}
mockResponse.emit('send');
mockResponse.emit('end');
};

@@ -247,0 +251,0 @@

9

package.json

@@ -5,3 +5,3 @@ {

"description": "Mock 'http' objects for testing Express routing functions",
"version": "1.4.2",
"version": "1.4.3",
"homepage": "https://github.com/howardabrams/node-mocks-http",

@@ -48,7 +48,6 @@ "bugs": {

"chai": "^2.2.0",
"eslint": "^0.18.0",
"eslint-plugin-mocha": "^0.2.2",
"eslint": "^0.22.1",
"gulp": "^3.8.11",
"gulp-eslint": "^0.8.0",
"gulp-istanbul": "^0.8.1",
"gulp-eslint": "^0.12.0",
"gulp-istanbul": "^0.9.0",
"gulp-mocha": "^2.0.1",

@@ -55,0 +54,0 @@ "istanbul": "^0.3.13",

@@ -143,2 +143,3 @@ [![node-mocks-http logo][nmh-logo]][nmh-url]

* [v1.4.3][release-v1.4.3] - June 3, 2015
* [v1.4.2][release-v1.4.2] - April 30, 2015

@@ -176,2 +177,3 @@ * [v1.4.1][release-v1.4.1] - April 14, 2015

[release-v1.4.3]: https://github.com/howardabrams/node-mocks-http/releases/tag/v1.4.3
[release-v1.4.2]: https://github.com/howardabrams/node-mocks-http/releases/tag/v1.4.2

@@ -178,0 +180,0 @@ [release-v1.4.1]: https://github.com/howardabrams/node-mocks-http/releases/tag/v1.4.1

@@ -468,5 +468,23 @@ 'use strict';

describe('.json()', function() {
var response;
beforeEach(function() {
response = mockResponse.createResponse();
sinon.spy(response, 'emit');
});
afterEach(function() {
response.emit.restore();
response = null;
});
it('method should mimic Express Response.json()');
it('should emit send and end events', function() {
response.json({});
expect(response.emit).to.have.been.calledTwice;
expect(response.emit).to.have.been.calledWith('send');
expect(response.emit).to.have.been.calledWith('end');
});
});

@@ -473,0 +491,0 @@

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