Comparing version 0.20.1 to 0.20.2
@@ -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); |
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
543325
5112