@tramvai/test-react 1.90.4 → 1.90.6
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 -1
- package/lib/index.js +1 -1
- package/package.json +6 -6
package/lib/index.es.js
CHANGED
|
@@ -9,7 +9,7 @@ import { waitRaf } from '@tramvai/test-jsdom';
|
|
|
9
9
|
import { renderHook, act as act$1 } from '@testing-library/react-hooks';
|
|
10
10
|
|
|
11
11
|
const testComponent = (element, { providers, initialState, store, stores, di, context = createMockContext({ initialState, providers, di, store, stores }), currentRoute, currentUrl, router = createMockRouter({ currentRoute, currentUrl }), renderOptions, } = {}) => {
|
|
12
|
-
const Wrapper = ({ children }) => (jsx(Provider, Object.assign({ context: context }, { children: jsx(DIContext.Provider, Object.assign({ value: context.di }, { children: jsx(Provider$1, Object.assign({ router: router }, { children: children }), void 0) }), void 0) }), void 0));
|
|
12
|
+
const Wrapper = ({ children }) => (jsx(Provider, Object.assign({ context: context, serverState: initialState }, { children: jsx(DIContext.Provider, Object.assign({ value: context.di }, { children: jsx(Provider$1, Object.assign({ router: router }, { children: children }), void 0) }), void 0) }), void 0));
|
|
13
13
|
const renderResults = render(jsx(Wrapper, { children: element }, void 0), renderOptions);
|
|
14
14
|
return {
|
|
15
15
|
render: renderResults,
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var testJsdom = require('@tramvai/test-jsdom');
|
|
|
12
12
|
var reactHooks = require('@testing-library/react-hooks');
|
|
13
13
|
|
|
14
14
|
const testComponent = (element, { providers, initialState, store, stores, di, context = testMocks.createMockContext({ initialState, providers, di, store, stores }), currentRoute, currentUrl, router: router$1 = testMocks.createMockRouter({ currentRoute, currentUrl }), renderOptions, } = {}) => {
|
|
15
|
-
const Wrapper = ({ children }) => (jsxRuntime.jsx(state.Provider, Object.assign({ context: context }, { children: jsxRuntime.jsx(react$1.DIContext.Provider, Object.assign({ value: context.di }, { children: jsxRuntime.jsx(router.Provider, Object.assign({ router: router$1 }, { children: children }), void 0) }), void 0) }), void 0));
|
|
15
|
+
const Wrapper = ({ children }) => (jsxRuntime.jsx(state.Provider, Object.assign({ context: context, serverState: initialState }, { children: jsxRuntime.jsx(react$1.DIContext.Provider, Object.assign({ value: context.di }, { children: jsxRuntime.jsx(router.Provider, Object.assign({ router: router$1 }, { children: children }), void 0) }), void 0) }), void 0));
|
|
16
16
|
const renderResults = react.render(jsxRuntime.jsx(Wrapper, { children: element }, void 0), renderOptions);
|
|
17
17
|
return {
|
|
18
18
|
render: renderResults,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-react",
|
|
3
|
-
"version": "1.90.
|
|
3
|
+
"version": "1.90.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"@testing-library/react": "^12.1.4",
|
|
22
22
|
"@testing-library/react-hooks": "^7.0.2",
|
|
23
23
|
"@tinkoff/router": "0.1.72",
|
|
24
|
-
"@tramvai/react": "1.90.
|
|
25
|
-
"@tramvai/state": "1.90.
|
|
26
|
-
"@tramvai/test-jsdom": "1.90.
|
|
27
|
-
"@tramvai/test-mocks": "1.90.
|
|
28
|
-
"@tramvai/tokens-common": "1.90.
|
|
24
|
+
"@tramvai/react": "1.90.6",
|
|
25
|
+
"@tramvai/state": "1.90.6",
|
|
26
|
+
"@tramvai/test-jsdom": "1.90.6",
|
|
27
|
+
"@tramvai/test-mocks": "1.90.6",
|
|
28
|
+
"@tramvai/tokens-common": "1.90.6",
|
|
29
29
|
"tslib": "^2.0.3"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|