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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,7 @@
85
85
-[**BREAKING**]`--testPathPattern` is now `--testPathPatterns`
86
86
-[**BREAKING**] Specifying `testPathPatterns` when programmatically calling `watch` must be specified as `new TestPathPatterns(patterns)`, where `TestPathPatterns` can be imported from `@jest/pattern`
87
87
-`[jest-reporters, jest-runner]` Unhandled errors without stack get correctly logged to console ([#14619](https://github.com/jestjs/jest/pull/14619))
88
+
-`[jest-util]` Always load `mjs` files with `import` ([#15447](https://github.com/jestjs/jest/pull/15447))
88
89
-`[jest-worker]` Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular ([#15191](https://github.com/jestjs/jest/pull/15191))
89
90
-`[jest-worker]` Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt ([#15191](https://github.com/jestjs/jest/pull/15191))
90
91
@@ -121,6 +122,7 @@
121
122
-`[docs]` Link NestJS documentation on testing with Jest ([#14940](https://github.com/jestjs/jest/pull/14940))
122
123
-`[docs]``Revised documentation for .toHaveBeenCalled()` to accurately depict its functionality. ([#14853](https://github.com/jestjs/jest/pull/14853))
123
124
-`[docs]` Removed ExpressJS reference link from documentation due to dead link ([#15270](https://github.com/jestjs/jest/pull/15270))
125
+
-`[docs]` Removed `Running AngularJS Tests with Jest reference` link from documentation due to dead link ([#15270](https://github.com/jestjs/jest/pull/15311))
Copy file name to clipboardExpand all lines: docs/GlobalAPI.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -251,7 +251,7 @@ Use `describe.each` if you keep duplicating the same test suites with different
251
251
-`%$` - Number of the test case.
252
252
-`%%` - single percent sign ('%'). This does not consume an argument.
253
253
- Or generate unique test titles by injecting properties of test case object with `$variable`
254
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
254
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
255
255
- You can use `$#` to inject the index of the test case
256
256
- You cannot use `$variable` with the `printf` formatting except for `%%`
257
257
-`fn`: `Function` the suite of tests to be run, this is the function that will receive the parameters in each row as function arguments.
@@ -305,7 +305,7 @@ describe.each([
305
305
- First row of variable name column headings separated with `|`
306
306
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
307
307
-`name`: `String` the title of the test suite, use `$variable` to inject test data into the suite title from the tagged template expressions, and `$#` for the index of the row.
308
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
308
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
309
309
-`fn`: `Function` the suite of tests to be run, this is the function that will receive the test data object.
310
310
- 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.
311
311
@@ -574,7 +574,7 @@ test.concurrent.each([
574
574
- First row of variable name column headings separated with `|`
575
575
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
576
576
-`name`: `String` the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions.
577
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
577
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
578
578
-`fn`: `Function` the test to be run, this is the function that will receive the test data object, **this will have to be an asynchronous function**.
579
579
- 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.
580
580
@@ -697,7 +697,7 @@ Use `test.each` if you keep duplicating the same test with different data. `test
697
697
-`%$` - Number of the test case.
698
698
-`%%` - single percent sign ('%'). This does not consume an argument.
699
699
- Or generate unique test titles by injecting properties of test case object with `$variable`
700
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
700
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
701
701
- You can use `$#` to inject the index of the test case
702
702
- You cannot use `$variable` with the `printf` formatting except for `%%`
703
703
-`fn`: `Function` the test to be run, this is the function that will receive the parameters in each row as function arguments.
@@ -731,7 +731,7 @@ test.each([
731
731
- First row of variable name column headings separated with `|`
732
732
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
733
733
-`name`: `String` the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions.
734
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
734
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
735
735
-`fn`: `Function` the test to be run, this is the function that will receive the test data object.
736
736
- 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.
Copy file name to clipboardExpand all lines: docs/TestingFrameworks.md
-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ Jest is a universal testing platform, with the ability to adapt to any JavaScrip
17
17
## AngularJS
18
18
19
19
-[Testing an AngularJS app with Jest](https://medium.com/aya-experience/testing-an-angularjs-app-with-jest-3029a613251) by Matthieu Lux ([@Swiip](https://twitter.com/Swiip))
20
-
-[Running AngularJS Tests with Jest](https://engineering.talentpair.com/running-angularjs-tests-with-jest-49d0cc9c6d26) by Ben Brandt ([@benjaminbrandt](https://twitter.com/benjaminbrandt))
21
20
-[AngularJS Unit Tests with Jest Actions (Traditional Chinese)](https://dwatow.github.io/2019/08-14-angularjs/angular-jest/?fbclid=IwAR2SrqYg_o6uvCQ79FdNPeOxs86dUqB6pPKgd9BgnHt1kuIDRyRM-ch11xg) by Chris Wang ([@dwatow](https://github.com/dwatow))
Copy file name to clipboardExpand all lines: packages/jest-each/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ const each = require('jest-each').default;
122
122
-`%$` - Number of the test case.
123
123
-`%%` - single percent sign ('%'). This does not consume an argument.
124
124
- Or generate unique test titles by injecting properties of test case object with `$variable`
125
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
125
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
126
126
- You can use `$#` to inject the index of the test case
127
127
- You cannot use `$variable` with the `printf` formatting except for `%%`
128
128
- testFn: `Function` the test logic, this is the function that will receive the parameters of each row as function arguments
@@ -149,7 +149,7 @@ const each = require('jest-each').default;
149
149
-`%$` - Number of the test case.
150
150
-`%%` - single percent sign ('%'). This does not consume an argument.
151
151
- Or generate unique test titles by injecting properties of test case object with `$variable`
152
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
152
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
153
153
- You can use `$#` to inject the index of the test case
154
154
- You cannot use `$variable` with the `printf` formatting except for `%%`
155
155
- 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
@@ -381,7 +381,7 @@ each`
381
381
##### `.test`:
382
382
383
383
- 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
384
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
384
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
385
385
- You can use `$#` to inject the index of the table row.
386
386
- testFn: `Function` the test logic, this is the function that will receive the parameters of each row as function arguments
387
387
@@ -418,7 +418,7 @@ each`
418
418
##### `.describe`:
419
419
420
420
- 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
421
-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
421
+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
422
422
- 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