Skip to content

Commit 016abd2

Browse files
committed
docs(automock): fix typo in code example
`TestBed.create(Service).mock(Dependency)` returns `Override<Dependency>` which has method `using` not `use`
1 parent 65b5bce commit 016abd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/recipes/automock.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ describe('CatsService unit spec', () => {
7171
beforeAll(() => {
7272
const { unit, unitRef } = TestBed.create(CatsService)
7373
.mock(HttpService)
74-
.use({ get: jest.fn() })
74+
.using({ get: jest.fn() })
7575
.mock(Logger)
76-
.use({ log: jest.fn() })
76+
.using({ log: jest.fn() })
7777
.mock(CatsDal)
78-
.use({ saveCats: jest.fn() })
78+
.using({ saveCats: jest.fn() })
7979
.compile();
8080

8181
underTest = unit;

0 commit comments

Comments
 (0)