https://github.com/webmasterdevlin/mobx-state-tree-course
Mobx 6 using Mobx State Tree and Mobx React Lite
https://github.com/webmasterdevlin/mobx-state-tree-course
cypress jest mobx mobx-react-lite mobx-state-tree react react-testing-library reactjs
Last synced: about 1 year ago
JSON representation
Mobx 6 using Mobx State Tree and Mobx React Lite
- Host: GitHub
- URL: https://github.com/webmasterdevlin/mobx-state-tree-course
- Owner: webmasterdevlin
- License: mit
- Created: 2021-01-03T09:27:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-28T08:41:05.000Z (about 5 years ago)
- Last Synced: 2025-01-26T13:42:19.506Z (over 1 year ago)
- Topics: cypress, jest, mobx, mobx-react-lite, mobx-state-tree, react, react-testing-library, reactjs
- Language: TypeScript
- Homepage:
- Size: 1.69 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://app.netlify.com/sites/upbeat-shaw-a043b7/deploys)
# Mobx State Tree Course
```zsh
$ git clone https://github.com/webmasterdevlin/mobx-state-tree-course-starter.git
$ cd mobx-state-tree-course-starter
$ npm installs
$ npm run start:fullstack
```
The React app, and the fake web service will run concurrently.

### Best practices in writing tests
https://kentcdodds.com/blog/common-mistakes-with-react-testing-library
- always use eslint-plugin-testing-library and eslint-plugin-jest-dom
- always use screen
- use screen.getByRole instead of screen.getByTestId
- use screen.queryByRole only when expecting not.toBeInTheDocument
- use await screen.find\* instead of await waitFor/wait
- if necessary, use await waitFor instead of await wait
- use userEvent instead of fireEvent
- avoid userEvent or fireEvent insides callbacks of waitFor as much as possible
### Cypress' best practices in writing tests
https://docs.cypress.io/guides/references/best-practices.html
### Application's styles
- The application is using test ID instead of role when querying dom elements
- Test IDs are simple and isolated