Skip to content

Commit 1497f49

Browse files
committed
update docusaurus
1 parent 192cf77 commit 1497f49

File tree

5 files changed

+70
-86
lines changed

5 files changed

+70
-86
lines changed

misc/vscode-jest-runner.gif

-4.4 MB
Binary file not shown.

misc/vscode-vitest-runner.gif

1.52 MB
Loading

website/package-lock.json

Lines changed: 61 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"react": "18.3.1",
2727
"react-animate-height": "3.2.3",
2828
"react-dom": "18.3.1",
29-
"react-parallax-tilt": "1.7.246"
29+
"react-parallax-tilt": "1.7.247"
3030
},
3131
"devDependencies": {
3232
"@docusaurus/module-type-aliases": "3.5.2",
@@ -45,7 +45,7 @@
4545
"postcss": "8.4.47",
4646
"prettier": "3.3.3",
4747
"prettier-plugin-tailwindcss": "0.6.8",
48-
"tailwindcss": "3.4.13",
48+
"tailwindcss": "3.4.14",
4949
"typescript": "5.6.3"
5050
},
5151
"browserslist": {

website/src/pages/index.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Style Guide requires you to use:
4949
Style Guide assumes using, but is not limited to:
5050

5151
- [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.
5353

5454
## TLDR
5555

@@ -1116,7 +1116,7 @@ Automated test comes with benefits that helps us write better code and makes it
11161116
- Strive to write tests in a way your app is used by a user, meaning test business logic.
11171117
E.g. For a specific user role or permission, given some input, we receive the expected output from the process.
11181118
- 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.
11201120
- Tests should be resilient to changes.
11211121
- Black box testing - Always test only implementation that is publicly exposed, don't write fragile tests on how implementation works internally.
11221122
- 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
11411141
### Test Description
11421142
11431143
All test descriptions must follow naming convention as `it('should ... when ...')`.
1144-
[Eslint rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-title.md#mustmatch--mustnotmatch) implements regex:
1144+
[Eslint rule](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md#mustmatch) implements:
11451145
11461146
```ts
11471147
// .eslintrc.js
1148-
'jest/valid-title': [
1148+
'vitest/valid-title': [
11491149
'error',
11501150
{
11511151
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');
11651165
11661166
### Test Tooling
11671167
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.
11701170
11711171
```sh
1172-
code --install-extension firsttris.vscode-jest-runner
1172+
code --install-extension vitest.explorer
11731173
code --install-extension ms-playwright.playwright
11741174
```
11751175

0 commit comments

Comments
 (0)