Skip to content

Commit b28af3e

Browse files
omermoradjmcdo29
andauthored
docs: fix some white spaces and text
Co-authored-by: Jay McDoniel <[email protected]>
1 parent 633f50e commit b28af3e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

content/recipes/automock.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ test development by automatically mocking class external dependencies.
77
#### Introduction
88

99
The dependency injection (DI) container is an essential component of the Nest module system.
10-
This container is utilized both during testing, and the application execution. \
10+
This container is utilized both during testing, and the application execution.
1111
Unit tests vary from other types of tests, such as integration tests, in that they must
1212
fully override providers/services within the DI container. External class dependencies
1313
(providers) of the so-called "unit", have to be totally isolated. That is, all dependencies
14-
within the DI container should be replaced by mock objects. \
14+
within the DI container should be replaced by mock objects.
1515
As a result, loading the target module and replacing the providers inside it is a process
1616
that loops back on itself. Automock tackles this issue by automatically mocking all the
1717
class external providers, resulting in total isolation of the unit under test.
@@ -28,7 +28,9 @@ Automock does not require any additional setup.
2828
Sinon will shortly be released.
2929

3030
#### Example
31+
3132
Consider the following cats service, which takes three constructor parameters:
33+
3234
```ts
3335
@@filename(cats.service)
3436
import { Injectable } from '@nestjs/core';
@@ -92,6 +94,7 @@ describe('Cats Service Unit Spec', () => {
9294
> wrapped with type definitions of Jest mock function. ([reference](https://jestjs.io/docs/mock-function-api/#jestmockedsource))
9395
9496
#### About `unit` and `unitRef`
97+
9598
Let's examine the following code:
9699

97100
```typescript

0 commit comments

Comments
 (0)