You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[jest-each]: Add support for keyPaths in test titles (jestjs#6457)
* Add support for keyPaths in test titles
* Move getPath from expect/utils to jest-util
* Add changelog entry
* Add keypath interpolation docs
* Add missing license and flow comments
* Revert "Move getPath from expect/utils to jest-util"
This reverts commit 6b98ef1.
* Refactor getPath to be simplier
* Remove unused code
* Fix changelog link
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
### Features
4
4
5
+
-`[jest-each]` Add support for keyPaths in test titles ([#6457](https://github.com/facebook/jest/pull/6457))
5
6
-`[jest-cli]` Add `jest --init` option that generates a basic configuration file with a short description for each option ([#6442](https://github.com/facebook/jest/pull/6442))
Copy file name to clipboardExpand all lines: packages/jest-each/README.md
+2
Original file line number
Diff line number
Diff line change
@@ -271,6 +271,7 @@ each`
271
271
##### `.test`:
272
272
273
273
- name: `String` the title of the `test`, use `$variable` in the name string to inject test values into the test title from the tagged template expressions
274
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
274
275
- testFn: `Function` the test logic, this is the function that will receive the parameters of each row as function arguments
- name: `String` the title of the `test`, use `$variable` in the name string to inject test values into the test title from the tagged template expressions
310
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
309
311
- suiteFn: `Function` the suite of `test`/`it`s to be ran, this is the function that will receive the parameters in each row as function arguments
0 commit comments