Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6fa35fe

Browse files
committed
Update spyOn examples adding a comment for jest.restoreAllMocks call
1 parent 8247b01 commit 6fa35fe

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

docs/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ Example test:
507507
const video = require('./video');
508508

509509
afterEach(() => {
510+
// restore the spy created with spyOn
510511
jest.restoreAllMocks();
511512
});
512513

@@ -556,6 +557,7 @@ const audio = require('./audio');
556557
const video = require('./video');
557558

558559
afterEach(() => {
560+
// restore the spy created with spyOn
559561
jest.restoreAllMocks();
560562
});
561563

website/versioned_docs/version-25.x/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ Example test:
496496
const video = require('./video');
497497

498498
afterEach(() => {
499+
// restore the spy created with spyOn
499500
jest.restoreAllMocks();
500501
});
501502

@@ -546,6 +547,7 @@ const audio = require('./audio');
546547
const video = require('./video');
547548

548549
afterEach(() => {
550+
// restore the spy created with spyOn
549551
jest.restoreAllMocks();
550552
});
551553

website/versioned_docs/version-26.x/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ Example test:
501501
const video = require('./video');
502502

503503
afterEach(() => {
504+
// restore the spy created with spyOn
504505
jest.restoreAllMocks();
505506
});
506507

@@ -551,6 +552,7 @@ const audio = require('./audio');
551552
const video = require('./video');
552553

553554
afterEach(() => {
555+
// restore the spy created with spyOn
554556
jest.restoreAllMocks();
555557
});
556558

website/versioned_docs/version-27.x/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ Example test:
501501
const video = require('./video');
502502

503503
afterEach(() => {
504+
// restore the spy created with spyOn
504505
jest.restoreAllMocks();
505506
});
506507

@@ -551,6 +552,7 @@ const audio = require('./audio');
551552
const video = require('./video');
552553

553554
afterEach(() => {
555+
// restore the spy created with spyOn
554556
jest.restoreAllMocks();
555557
});
556558

website/versioned_docs/version-28.0/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ Example test:
507507
const video = require('./video');
508508

509509
afterEach(() => {
510+
// restore the spy created with spyOn
510511
jest.restoreAllMocks();
511512
});
512513

@@ -557,6 +558,7 @@ const audio = require('./audio');
557558
const video = require('./video');
558559

559560
afterEach(() => {
561+
// restore the spy created with spyOn
560562
jest.restoreAllMocks();
561563
});
562564

website/versioned_docs/version-28.1/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ Example test:
507507
const video = require('./video');
508508

509509
afterEach(() => {
510+
// restore the spy created with spyOn
510511
jest.restoreAllMocks();
511512
});
512513

@@ -558,6 +559,7 @@ const audio = require('./audio');
558559
const video = require('./video');
559560

560561
afterEach(() => {
562+
// restore the spy created with spyOn
561563
jest.restoreAllMocks();
562564
});
563565

0 commit comments

Comments
 (0)