@tramvai/test-mocks 2.22.0 → 2.24.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.es.js +1 -0
- package/lib/index.js +3 -2
- package/package.json +7 -7
package/lib/index.es.js
CHANGED
|
@@ -194,6 +194,7 @@ const createMockRequestManager = ({ body = null, url = 'http://localhost', metho
|
|
|
194
194
|
return {
|
|
195
195
|
getBody: () => body,
|
|
196
196
|
getUrl: () => url,
|
|
197
|
+
getParsedUrl: () => parse(url),
|
|
197
198
|
getMethod: () => method,
|
|
198
199
|
getCookie: (name) => cookies[name],
|
|
199
200
|
getCookies: () => cookies,
|
package/lib/index.js
CHANGED
|
@@ -200,10 +200,11 @@ const createMockLogger = () => {
|
|
|
200
200
|
return Object.assign(() => logger, logger);
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
-
const createMockRequestManager = ({ body = null, url = 'http://localhost', method = 'GET', cookies = {}, headers = {}, clientIp = '127.0.0.1', host = 'localhost', } = {}) => {
|
|
203
|
+
const createMockRequestManager = ({ body = null, url: url$1 = 'http://localhost', method = 'GET', cookies = {}, headers = {}, clientIp = '127.0.0.1', host = 'localhost', } = {}) => {
|
|
204
204
|
return {
|
|
205
205
|
getBody: () => body,
|
|
206
|
-
getUrl: () => url,
|
|
206
|
+
getUrl: () => url$1,
|
|
207
|
+
getParsedUrl: () => url.parse(url$1),
|
|
207
208
|
getMethod: () => method,
|
|
208
209
|
getCookie: (name) => cookies[name],
|
|
209
210
|
getCookies: () => cookies,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-mocks",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"build-for-publish": "true"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tramvai/core": "2.
|
|
21
|
+
"@tramvai/core": "2.24.3",
|
|
22
22
|
"@tinkoff/pubsub": "0.5.3",
|
|
23
23
|
"@tinkoff/router": "0.2.2",
|
|
24
24
|
"@tinkoff/url": "0.8.2",
|
|
25
|
-
"@tramvai/module-cookie": "2.
|
|
26
|
-
"@tramvai/module-common": "2.
|
|
27
|
-
"@tramvai/state": "2.
|
|
28
|
-
"@tramvai/tokens-common": "2.
|
|
25
|
+
"@tramvai/module-cookie": "2.24.3",
|
|
26
|
+
"@tramvai/module-common": "2.24.3",
|
|
27
|
+
"@tramvai/state": "2.24.3",
|
|
28
|
+
"@tramvai/tokens-common": "2.24.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@tinkoff/dippy": "0.8.
|
|
31
|
+
"@tinkoff/dippy": "0.8.3",
|
|
32
32
|
"@tinkoff/utils": "^2.1.2",
|
|
33
33
|
"tslib": "^2.0.3"
|
|
34
34
|
},
|