Skip to content

Commit

Permalink
Update docs about introducing %$ option
Browse files Browse the repository at this point in the history
  • Loading branch information
kemuridama committed Nov 22, 2023
1 parent 06209ca commit 7bf1404
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/GlobalAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Use `describe.each` if you keep duplicating the same test suites with different
- `%j` - JSON.
- `%o` - Object.
- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.
- Or generate unique test titles by injecting properties of test case object with `$variable`
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
Expand Down Expand Up @@ -550,6 +551,7 @@ Use `test.concurrent.each` if you keep duplicating the same test with different
- `%j` - JSON.
- `%o` - Object.
- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.
- `fn`: `Function` the test to be run, this is the function that will receive the parameters in each row as function arguments, **this will have to be an asynchronous function**.
- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. The default timeout is 5 seconds.
Expand Down Expand Up @@ -692,6 +694,7 @@ Use `test.each` if you keep duplicating the same test with different data. `test
- `%j` - JSON.
- `%o` - Object.
- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.
- Or generate unique test titles by injecting properties of test case object with `$variable`
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
Expand Down
3 changes: 3 additions & 0 deletions packages/jest-each/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jest-each allows you to provide multiple arguments to your `test`/`describe` whi
- `%j` - JSON.
- `%o` - Object.
- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.
- Unique test titles by injecting properties of test case object
- 🖖 Spock like data tables with [Tagged Template Literals](#tagged-template-literal-of-rows)
Expand Down Expand Up @@ -118,6 +119,7 @@ const each = require('jest-each').default;
- `%j` - JSON.
- `%o` - Object.
- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.
- Or generate unique test titles by injecting properties of test case object with `$variable`
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
Expand All @@ -144,6 +146,7 @@ const each = require('jest-each').default;
- `%j` - JSON.
- `%o` - Object.
- `%#` - Index of the test case.
- `%$` - Number of the test case.
- `%%` - single percent sign ('%'). This does not consume an argument.
- Or generate unique test titles by injecting properties of test case object with `$variable`
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
Expand Down

0 comments on commit 7bf1404

Please sign in to comment.