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

zt-hock

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zt-hock - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

6

lib/hock.js

@@ -88,3 +88,3 @@ const Request = require('./request');

if (this._assertions.length) {
this._assertions = this._assertions.filter((request) => request.isDone());
this._assertions = this.getUnusedAssertions();

@@ -353,2 +353,6 @@ if (this._assertions.length) {

}
getUnusedAssertions() {
return this._assertions.filter((request) => request.isDone());
}
}

@@ -355,0 +359,0 @@

2

package.json
{
"name": "zt-hock",
"description": "A mocking server for HTTP requests, forked from Hock",
"version": "1.0.0",
"version": "1.1.0",
"author": "Joachim Seminck <joachim@seminck.be>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -220,2 +220,10 @@ const request = require('request');

it('unmatched requests should show up with getUnusedAssertions()', function() {
this.hockInstance
.head('/head')
.reply(200, '', { 'Content-Type': 'plain/text' });
expect(this.hockInstance.getUnusedAssertions().length).toBe(1);
});
it('should work with a delay configured', function(done) {

@@ -222,0 +230,0 @@ this.hockInstance

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