Skip to content

Commit b64f1de

Browse files
authored
docs: update restore method examples (#152)
1 parent 2d418b1 commit b64f1de

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

content/docs/concepts/dependency_injection.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,11 @@ Once a swap has been defined, the container will use it instead of the actual cl
473473
```ts
474474
app.container.restore(UserService)
475475

476+
// Restore UserService and PostService
477+
app.container.restoreAll([UserService, PostService])
478+
476479
// Restore all
477-
app.container.restore()
480+
app.container.restoreAll()
478481
```
479482

480483
## Contextual dependencies

content/docs/testing/mocks_and_fakes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ Once the test has been completed, you must restore the fake using the `container
6969
```ts
7070
app.container.restore(UserService)
7171

72+
// Restore UserService and PostService
73+
app.container.restoreAll([UserService, PostService])
74+
7275
// Restore all
73-
app.container.restore()
76+
app.container.restoreAll()
7477
```
7578

7679
## Mocks and stubs using Sinon.js

0 commit comments

Comments
 (0)