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

mockyeah

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mockyeah - npm Package Compare versions

Comparing version 0.20.1 to 0.20.2

4

app/lib/RouteResolver.js

@@ -179,3 +179,3 @@ 'use strict';

path: _path,
pathFn: p => _path.test(p),
pathFn: p => _path.test(decodeProtocolAndPort(p)),
pathname: _path

@@ -188,3 +188,3 @@ };

path: _path,
pathFn: _path,
pathFn: p => _path(decodeProtocolAndPort(p)),
pathname: _path

@@ -191,0 +191,0 @@ };

{
"name": "mockyeah",
"version": "0.20.1",
"version": "0.20.2",
"description": "A powerful service mocking, recording, and playback utility.",

@@ -86,3 +86,3 @@ "main": "index.js",

"private": false,
"gitHead": "3b7bde8ef4cea4f8a9d07cc8455afffc05ea219f"
"gitHead": "3f480775987b8922b256271fee94d7f87e88181b"
}

@@ -113,2 +113,35 @@ 'use strict';

it('should support registering full URLs and matching request with custom-encoded URLs with regex', done => {
mockyeah.get(new RegExp(`http://localhost:${proxiedPort}`), { text: 'bar', status: 500 });
async.series(
[
cb =>
supertest(proxiedApp)
.get('/foo')
.expect(200, cb),
cb => request.get(`/http~~~localhost~${proxiedPort}/foo?ok=yes`).expect(500, 'bar', cb)
],
done
);
});
it('should support registering full URLs and matching request with custom-encoded URLs with function', done => {
mockyeah.get(p => p === `/http://localhost:${proxiedPort}/foo`, {
text: 'bar',
status: 500
});
async.series(
[
cb =>
supertest(proxiedApp)
.get('/foo')
.expect(200, cb),
cb => request.get(`/http~~~localhost~${proxiedPort}/foo?ok=yes`).expect(500, 'bar', cb)
],
done
);
});
it('should support proxying custom-encoded URLs', done => {

@@ -115,0 +148,0 @@ request.get(`/http~~~localhost~${proxiedPort}/foo`).expect(200, done);

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