@@ -730,7 +730,7 @@ describe('tests', async () => {
730
730
## Class: ` MockFunctionContext `
731
731
732
732
<!-- YAML
733
- added: REPLACEME
733
+ added: v19.1.0
734
734
-->
735
735
736
736
The ` MockFunctionContext ` class is used to inspect or manipulate the behavior of
@@ -739,7 +739,7 @@ mocks created via the [`MockTracker`][] APIs.
739
739
### ` ctx.calls `
740
740
741
741
<!-- YAML
742
- added: REPLACEME
742
+ added: v19.1.0
743
743
-->
744
744
745
745
* {Array}
@@ -761,7 +761,7 @@ mock. Each entry in the array is an object with the following properties.
761
761
### ` ctx.callCount() `
762
762
763
763
<!-- YAML
764
- added: REPLACEME
764
+ added: v19.1.0
765
765
-->
766
766
767
767
* Returns: {integer} The number of times that this mock has been invoked.
@@ -773,7 +773,7 @@ is a getter that creates a copy of the internal call tracking array.
773
773
### ` ctx.mockImplementation(implementation) `
774
774
775
775
<!-- YAML
776
- added: REPLACEME
776
+ added: v19.1.0
777
777
-->
778
778
779
779
* ` implementation ` {Function|AsyncFunction} The function to be used as the
@@ -810,7 +810,7 @@ test('changes a mock behavior', (t) => {
810
810
### ` ctx.mockImplementationOnce(implementation[, onCall]) `
811
811
812
812
<!-- YAML
813
- added: REPLACEME
813
+ added: v19.1.0
814
814
-->
815
815
816
816
* ` implementation ` {Function|AsyncFunction} The function to be used as the
@@ -854,7 +854,7 @@ test('changes a mock behavior once', (t) => {
854
854
### ` ctx.restore() `
855
855
856
856
<!-- YAML
857
- added: REPLACEME
857
+ added: v19.1.0
858
858
-->
859
859
860
860
Resets the implementation of the mock function to its original behavior. The
@@ -863,7 +863,7 @@ mock can still be used after calling this function.
863
863
## Class: ` MockTracker `
864
864
865
865
<!-- YAML
866
- added: REPLACEME
866
+ added: v19.1.0
867
867
-->
868
868
869
869
The ` MockTracker ` class is used to manage mocking functionality. The test runner
@@ -874,7 +874,7 @@ Each test also provides its own `MockTracker` instance via the test context's
874
874
### ` mock.fn([original[, implementation]][, options]) `
875
875
876
876
<!-- YAML
877
- added: REPLACEME
877
+ added: v19.1.0
878
878
-->
879
879
880
880
* ` original ` {Function|AsyncFunction} An optional function to create a mock on.
@@ -925,7 +925,7 @@ test('mocks a counting function', (t) => {
925
925
### ` mock.method(object, methodName[, implementation][, options]) `
926
926
927
927
<!-- YAML
928
- added: REPLACEME
928
+ added: v19.1.0
929
929
-->
930
930
931
931
* ` object ` {Object} The object whose method is being mocked.
@@ -979,7 +979,7 @@ test('spies on an object method', (t) => {
979
979
### ` mock.reset() `
980
980
981
981
<!-- YAML
982
- added: REPLACEME
982
+ added: v19.1.0
983
983
-->
984
984
985
985
This function restores the default behavior of all mocks that were previously
@@ -995,7 +995,7 @@ function manually is recommended.
995
995
### ` mock.restoreAll() `
996
996
997
997
<!-- YAML
998
- added: REPLACEME
998
+ added: v19.1.0
999
999
-->
1000
1000
1001
1001
This function restores the default behavior of all mocks that were previously
0 commit comments