Skip to content

Commit

Permalink
docs: do not use should when describing your tests, fix #170
Browse files Browse the repository at this point in the history
  • Loading branch information
rodmax committed Jan 21, 2021
1 parent 6f16db0 commit 7679395
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,15 @@ Why verb for **commands**:
- A: Yes just look to return type
- commands: `doAction(): void | Promise<void> | Observable<void>`
- queries: `data(): <any non void type>`

## Should Not Begin With Should in test description

Do not use should when describing your tests.<br>
Use the third person in the present tense.

[Short](https://www.betterspecs.org/#should) and [slightly longer](http://bretthard.in/post/tests-should-not-begin-with-should) explanations

```diff
- it('should not change timings')
+ it('does not change timings')
```
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe(`${GithubProfilePage.name}`, () => {
httpClientMock.reset()
})

it('should load and show github user data', () => {
it('loads and shows github user data', () => {
const { getByText } = renderWithStore(<GithubProfilePage />, testingStore())
httpClientMock
.expect<GithubUserDto>({ url: 'https://api.github.com/users/rodmax' })
Expand Down

0 comments on commit 7679395

Please sign in to comment.