From 76793959dc5518430b79f0dc797832e19d216502 Mon Sep 17 00:00:00 2001 From: "max.rodionov" Date: Thu, 21 Jan 2021 23:56:05 +0300 Subject: [PATCH] docs: do not use should when describing your tests, fix #170 --- docs/naming.md | 12 ++++++++++++ .../github-profile-page/github-profile-page.spec.tsx | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/naming.md b/docs/naming.md index f6c35b2c..1b93393a 100644 --- a/docs/naming.md +++ b/docs/naming.md @@ -72,3 +72,15 @@ Why verb for **commands**: - A: Yes just look to return type - commands: `doAction(): void | Promise | Observable` - queries: `data(): ` + +## Should Not Begin With Should in test description + +Do not use should when describing your tests.
+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') +``` diff --git a/src/modules/github/pages/github-profile-page/github-profile-page.spec.tsx b/src/modules/github/pages/github-profile-page/github-profile-page.spec.tsx index e6ac4432..041e409b 100644 --- a/src/modules/github/pages/github-profile-page/github-profile-page.spec.tsx +++ b/src/modules/github/pages/github-profile-page/github-profile-page.spec.tsx @@ -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(, testingStore()) httpClientMock .expect({ url: 'https://api.github.com/users/rodmax' })