-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
createDestination: Use
Record
type for stdoutMock.calls
and `stdo…
…utMock.onlyCall()` (#137)
- Loading branch information
Showing
2 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@seek/logger': patch | ||
--- | ||
|
||
createDestination: Use `Record` type for `stdoutMock.calls` and `stdoutMock.onlyCall()` | ||
|
||
This allows you to destructure a call in your test code without the TypeScript compiler complaining: | ||
|
||
```typescript | ||
const { level, ...rest } = stdoutMock.onlyCall(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters