@pie-lib/test-utils 0.2.19 → 0.2.20
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 +11 -124
- package/lib/index.js +9 -3
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.2.
|
|
6
|
+
## [0.2.20](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.19...@pie-lib/test-utils@0.2.20) (2022-11-23)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
9
9
|
|
|
@@ -11,250 +11,137 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [0.2.
|
|
14
|
+
## [0.2.19](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.17...@pie-lib/test-utils@0.2.19) (2021-06-25)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
17
17
|
|
|
18
|
+
## [0.2.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.16...@pie-lib/test-utils@0.2.17) (2021-02-15)
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
**Note:** Version bump only for package @pie-lib/test-utils
|
|
21
21
|
|
|
22
22
|
## [0.2.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.14...@pie-lib/test-utils@0.2.16) (2021-02-15)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
26
|
## [0.2.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.13...@pie-lib/test-utils@0.2.14) (2020-04-14)
|
|
31
27
|
|
|
32
28
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
30
|
## [0.2.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.12...@pie-lib/test-utils@0.2.13) (2020-04-08)
|
|
39
31
|
|
|
40
32
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
41
33
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
34
|
## [0.2.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.11...@pie-lib/test-utils@0.2.12) (2020-03-31)
|
|
47
35
|
|
|
48
36
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
49
37
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
38
|
## [0.2.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.10...@pie-lib/test-utils@0.2.11) (2020-03-31)
|
|
55
39
|
|
|
56
40
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
42
|
## [0.2.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.9...@pie-lib/test-utils@0.2.10) (2020-03-31)
|
|
63
43
|
|
|
64
44
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
65
45
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
46
|
## [0.2.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.8...@pie-lib/test-utils@0.2.9) (2020-03-30)
|
|
71
47
|
|
|
72
48
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
73
49
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
50
|
## [0.2.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.7...@pie-lib/test-utils@0.2.8) (2020-03-30)
|
|
79
51
|
|
|
80
52
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
81
53
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
54
|
## [0.2.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.6...@pie-lib/test-utils@0.2.7) (2020-03-30)
|
|
87
55
|
|
|
88
56
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
89
57
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
58
|
## [0.2.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.5...@pie-lib/test-utils@0.2.6) (2020-03-30)
|
|
95
59
|
|
|
96
60
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
97
61
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
62
|
## [0.2.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.4...@pie-lib/test-utils@0.2.5) (2020-03-30)
|
|
103
63
|
|
|
104
64
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
105
65
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
66
|
## [0.2.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.3...@pie-lib/test-utils@0.2.4) (2020-03-30)
|
|
111
67
|
|
|
112
68
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
113
69
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
70
|
## [0.2.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.2...@pie-lib/test-utils@0.2.3) (2020-03-30)
|
|
119
71
|
|
|
120
|
-
|
|
121
72
|
### Bug Fixes
|
|
122
73
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
74
|
+
- add module prop to package.json ([e0cc500](https://github.com/pie-framework/pie-lib/commit/e0cc500))
|
|
128
75
|
|
|
129
76
|
## [0.2.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.1...@pie-lib/test-utils@0.2.2) (2019-08-21)
|
|
130
77
|
|
|
131
78
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
132
79
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
80
|
## [0.2.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.2.0...@pie-lib/test-utils@0.2.1) (2019-06-17)
|
|
138
81
|
|
|
139
82
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
140
83
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
84
|
# [0.2.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.9...@pie-lib/test-utils@0.2.0) (2019-06-12)
|
|
146
85
|
|
|
147
|
-
|
|
148
86
|
### Features
|
|
149
87
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
88
|
+
- version bumps ([23eb54f](https://github.com/pie-framework/pie-lib/commit/23eb54f))
|
|
155
89
|
|
|
156
90
|
## [0.1.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.8...@pie-lib/test-utils@0.1.9) (2019-03-15)
|
|
157
91
|
|
|
158
|
-
|
|
159
92
|
### Bug Fixes
|
|
160
93
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
94
|
+
- rm child prepack in favour of root prepack ([381d8d6](https://github.com/pie-framework/pie-lib/commit/381d8d6))
|
|
166
95
|
|
|
167
96
|
## [0.1.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.7...@pie-lib/test-utils@0.1.8) (2019-03-14)
|
|
168
97
|
|
|
169
98
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
170
99
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
100
|
## [0.1.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.6...@pie-lib/test-utils@0.1.7) (2019-03-14)
|
|
176
101
|
|
|
177
102
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
178
103
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
104
|
## [0.1.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.5...@pie-lib/test-utils@0.1.6) (2019-03-14)
|
|
184
105
|
|
|
185
106
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
186
107
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
108
|
## [0.1.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.4...@pie-lib/test-utils@0.1.5) (2019-03-14)
|
|
192
109
|
|
|
193
110
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
194
111
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
112
|
## [0.1.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.3...@pie-lib/test-utils@0.1.4) (2019-03-13)
|
|
200
113
|
|
|
201
114
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
202
115
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
116
|
## [0.1.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.2...@pie-lib/test-utils@0.1.3) (2019-03-13)
|
|
208
117
|
|
|
209
118
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
210
119
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
120
|
## [0.1.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.1...@pie-lib/test-utils@0.1.2) (2019-03-13)
|
|
216
121
|
|
|
217
122
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
218
123
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
124
|
## [0.1.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.1.0...@pie-lib/test-utils@0.1.1) (2019-01-30)
|
|
224
125
|
|
|
225
126
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
226
127
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
128
|
# [0.1.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.0.3...@pie-lib/test-utils@0.1.0) (2019-01-30)
|
|
232
129
|
|
|
233
|
-
|
|
234
130
|
### Features
|
|
235
131
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
132
|
+
- libs version bump ([de9ac2b](https://github.com/pie-framework/pie-lib/commit/de9ac2b))
|
|
241
133
|
|
|
242
134
|
<a name="0.0.3"></a>
|
|
243
|
-
## [0.0.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.0.2...@pie-lib/test-utils@0.0.3) (2018-05-08)
|
|
244
135
|
|
|
136
|
+
## [0.0.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/test-utils@0.0.2...@pie-lib/test-utils@0.0.3) (2018-05-08)
|
|
245
137
|
|
|
246
138
|
### Bug Fixes
|
|
247
139
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
140
|
+
- **dependencies:** make enzyme a peerDependency ([181c641](https://github.com/pie-framework/pie-lib/commit/181c641))
|
|
252
141
|
|
|
253
142
|
<a name="0.0.2"></a>
|
|
254
|
-
## 0.0.2 (2018-05-03)
|
|
255
|
-
|
|
256
|
-
|
|
257
143
|
|
|
144
|
+
## 0.0.2 (2018-05-03)
|
|
258
145
|
|
|
259
146
|
**Note:** Version bump only for package @pie-lib/test-utils
|
|
260
147
|
|
package/lib/index.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
3
7
|
Object.defineProperty(exports, "__esModule", {
|
|
4
8
|
value: true
|
|
5
9
|
});
|
|
6
10
|
exports.shallowChild = shallowChild;
|
|
7
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
8
14
|
var React = _interopRequireWildcard(require("react"));
|
|
9
15
|
|
|
10
16
|
var _enzyme = require("enzyme");
|
|
11
17
|
|
|
12
|
-
function
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
19
|
|
|
14
|
-
function
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
21
|
|
|
16
22
|
function shallowChild(Component) {
|
|
17
23
|
var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
18
24
|
var nestLevel = arguments.length > 2 ? arguments[2] : undefined;
|
|
19
25
|
return function innerRender() {
|
|
20
26
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
|
-
var rendered = (0, _enzyme.shallow)(React.createElement(Component,
|
|
27
|
+
var rendered = (0, _enzyme.shallow)( /*#__PURE__*/React.createElement(Component, (0, _extends2["default"])({}, defaultProps, props)));
|
|
22
28
|
|
|
23
29
|
if (nestLevel) {
|
|
24
30
|
var repeat = nestLevel;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["shallowChild","Component","defaultProps","nestLevel","innerRender","props","rendered","repeat","first","shallow"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["shallowChild","Component","defaultProps","nestLevel","innerRender","props","rendered","repeat","first","shallow"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;;;;;AAEO,SAASA,YAAT,CAAsBC,SAAtB,EAA+D;AAAA,MAA9BC,YAA8B,uEAAf,EAAe;AAAA,MAAXC,SAAW;AACpE,SAAO,SAASC,WAAT,GAAiC;AAAA,QAAZC,KAAY,uEAAJ,EAAI;AACtC,QAAIC,QAAQ,GAAG,mCAAQ,oBAAC,SAAD,gCAAeJ,YAAf,EAAiCG,KAAjC,EAAR,CAAf;;AAEA,QAAIF,SAAJ,EAAe;AACb,UAAII,MAAM,GAAGJ,SAAb;;AAEA,aAAOI,MAAM,EAAb,EAAiB;AACfD,QAAAA,QAAQ,GAAGA,QAAQ,CAACE,KAAT,GAAiBC,OAAjB,EAAX;AACD;AACF;;AAED,WAAOH,QAAP;AACD,GAZD;AAaD","sourcesContent":["import * as React from 'react';\nimport { shallow } from 'enzyme';\n\nexport function shallowChild(Component, defaultProps = {}, nestLevel) {\n return function innerRender(props = {}) {\n let rendered = shallow(<Component {...defaultProps} {...props} />);\n\n if (nestLevel) {\n let repeat = nestLevel;\n\n while (repeat--) {\n rendered = rendered.first().shallow();\n }\n }\n\n return rendered;\n };\n}\n"],"file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/test-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"enzyme": "^3.8.0",
|
|
14
14
|
"react": "^16.8.1"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "f81076118e63884db5f5d65a41cff9aad111137e",
|
|
17
17
|
"scripts": {}
|
|
18
18
|
}
|