Skip to content

Commit 80dc62b

Browse files
jmcdo29Tony133
andauthored
fix: golevelup repo link correction
Co-authored-by: Tony <[email protected]>
1 parent 6b97745 commit 80dc62b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/fundamentals/unit-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Instead of using the production version of any provider, you can override it wit
162162

163163
#### Auto mocking
164164

165-
Nest also allows you to define a mock factory to apply to all of your missing dependencies. This is useful for cases where you have a large number of dependencies in a class and mocking all of them will take a long time and a lot of setup. To make use of this feature, the `createTestingModule()` will need to be chained up with the `useMocker()` method, passing a factory for your dependency mocks. This factory can take in an optional token, which is an instance token, any token which is valid for a Nest provider, and returns a mock implementation. Otherwise, a general mock factory, like `createMock` from [`@golevelup/ts-jest`](https://github.com/golevelup/https://github.com/golevelup/nestjs/tree/master/packages/testing) can be passed directly.
165+
Nest also allows you to define a mock factory to apply to all of your missing dependencies. This is useful for cases where you have a large number of dependencies in a class and mocking all of them will take a long time and a lot of setup. To make use of this feature, the `createTestingModule()` will need to be chained up with the `useMocker()` method, passing a factory for your dependency mocks. This factory can take in an optional token, which is an instance token, any token which is valid for a Nest provider, and returns a mock implementation. Otherwise, a general mock factory, like `createMock` from [`@golevelup/ts-jest`](https://github.com/golevelup/nestjs/tree/master/packages/testing) can be passed directly.
166166

167167
```typescript
168168
describe('CatsController', () => {

0 commit comments

Comments
 (0)