@truedat/test 4.45.6 → 4.46.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.45.8] 2022-06-09
4
+
5
+ ### Added
6
+
7
+ - [TD-4431] `render` now can receive `dispatch` option that will be replaced on store to test dispatched action calls
8
+
3
9
  ## [4.44.3] 2022-05-11
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/test",
3
- "version": "4.45.6",
3
+ "version": "4.46.0",
4
4
  "description": "Truedat Web Test",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -99,5 +99,5 @@
99
99
  "react": ">= 16.8.6 < 17",
100
100
  "react-dom": ">= 16.8.6 < 17"
101
101
  },
102
- "gitHead": "6624767ce3b6893d538087057b662d11f90eb72d"
102
+ "gitHead": "ed9e54123f20ee10a528c865653da09022457327"
103
103
  }
package/src/render.js CHANGED
@@ -17,6 +17,7 @@ const customRender = (
17
17
  routes = ["/"],
18
18
  routeIndex,
19
19
  fallback = false,
20
+ dispatch,
20
21
  ...renderOptions
21
22
  } = {}
22
23
  ) => {
@@ -44,6 +45,8 @@ const customRender = (
44
45
  content
45
46
  );
46
47
  }
48
+ // eslint-disable-next-line fp/no-mutation
49
+ if (dispatch) store.dispatch = dispatch;
47
50
  return render(component, { wrapper: Wrapper, ...renderOptions });
48
51
  };
49
52