You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/pages/index.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Style Guide requires you to use:
49
49
Style Guide assumes using, but is not limited to:
50
50
51
51
-[React](https://github.com/facebook/react) as UI library for frontend conventions.
52
-
-[Playwright](https://playwright.dev/) and [Testing Library](https://testing-library.com/) for testing conventions.
52
+
-[Playwright](https://playwright.dev/) and [Vitest](https://vitest.dev/) for testing conventions.
53
53
54
54
## TLDR
55
55
@@ -1116,7 +1116,7 @@ Automated test comes with benefits that helps us write better code and makes it
1116
1116
- Strive to write tests in a way your app is used by a user, meaning test business logic.
1117
1117
E.g. For a specific user role or permission, given some input, we receive the expected output from the process.
1118
1118
- Make tests as isolated as possible, where they don't depend on order of execution and should run independently with its own local storage, session storage, data, cookies etc.
1119
-
Test isolation improves reproducibility, makes debugging easier and prevents cascading test failures.
1119
+
Test isolation speeds up the test run, improves reproducibility, makes debugging easier and prevents cascading test failures.
1120
1120
- Tests should be resilient to changes.
1121
1121
- Black box testing - Always test only implementation that is publicly exposed, don't write fragile tests on how implementation works internally.
1122
1122
- Query HTML elements based on attributes that are unlikely to change. Order of priority must be followed as specified in [Testing Library](https://testing-library.com/docs/queries/about/#priority) - [role](https://testing-library.com/docs/queries/byrole), [label](https://testing-library.com/docs/queries/bylabeltext), [placeholder](https://testing-library.com/docs/queries/byplaceholdertext), [text contents](https://testing-library.com/docs/queries/bytext), [display value](https://testing-library.com/docs/queries/bydisplayvalue), [alt text](https://testing-library.com/docs/queries/byalttext), [title](https://testing-library.com/docs/queries/bytitle), [test ID](https://testing-library.com/docs/queries/bytestid).
@@ -1141,11 +1141,11 @@ Automated test comes with benefits that helps us write better code and makes it
1141
1141
### Test Description
1142
1142
1143
1143
All test descriptions must follow naming convention as `it('should ... when ...')`.
mustMatch: { it: [/should.*when/u.source, "Test title must include 'should' and 'when'"] },
@@ -1165,11 +1165,11 @@ it('should render user description when title is confirmed');
1165
1165
1166
1166
### Test Tooling
1167
1167
1168
-
Tests can be run through scripts, but it's highly encouraged to use [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) and [Playwright Test](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) VS code extension alongside.
1169
-
With extension any single [unit/integration](https://github.com/mkosir/typescript-style-guide/raw/main/misc/vscode-jest-runner.gif) or [E2E](https://github.com/mkosir/typescript-style-guide/raw/main/misc/vscode-playwright-test.gif) test can be run instantly, especially if testing app or package in larger monorepo codebase.
1168
+
Besides running tests through scripts, it's highly encouraged to use [Vitest Runner](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) and [Playwright Test](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) VS code extension alongside.
1169
+
With extension any single [unit/integration](https://github.com/mkosir/typescript-style-guide/raw/main/misc/vscode-vitest-runner.gif) or [E2E](https://github.com/mkosir/typescript-style-guide/raw/main/misc/vscode-playwright-test.gif) test can be run instantly, especially if testing app or package in larger monorepo codebase.
0 commit comments