Skip to content

Commit

Permalink
Adding testing environment
Browse files Browse the repository at this point in the history
  • Loading branch information
StopNGo committed Sep 17, 2022
1 parent a5631c3 commit cd03f1c
Show file tree
Hide file tree
Showing 9 changed files with 13,427 additions and 8,311 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"env": {
"browser": true,
"es2021": true,
"node": true
"node": true,
"jest": true
},
"extends": [
"plugin:react/recommended",
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ Linters:

Tests:

- *coming soon*
- **Jest** 29+
- **React Testing Library**
- Utility for Redux Testing
- One example of integration test of a component with user event and Redux

Other:

Expand Down Expand Up @@ -134,6 +137,18 @@ This boilerplate includes a simple application with:

`npm run build:static`

### Updating packages

All packages in this project are pinned to latest versions at the time of publishing to exclude version-based conflicts and errors and to guarantee proper work of the code in this repository.

If you want to update packages, do next:

```
npm install -g npm-check-updates
ncu -u
npm i
```

## Basic App Configuration

All configuration is available in files with constants:
Expand All @@ -148,11 +163,15 @@ All configuration is available in files with constants:

One of the goals of this project is to provide some common soultions in React development and to clarify why they were chosen and how they work. So, such information will be present in this documentation in an orderly fashion.

## Changes

Detailed release notes for a given version can be found on [releases page](https://github.com/StopNGo/react-proto/releases).

## Feedback

I welcome any feedbacks, suggestions and questions related to this project.

You can leave them [here](https://github.com/StopNGo/react-proto/issues).
You can leave them on [issues](https://github.com/StopNGo/react-proto/issues) or [discussions](https://github.com/StopNGo/react-proto/discussions) pages.

![Thank you!](http:https://media.riffsy.com/images/26d31721af290a7e42eae0498a4730a5/tenor.gif)

Expand Down
22 changes: 22 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"verbose": true,
"preset": "ts-jest",
"testEnvironment": "jsdom",
"moduleNameMapper": {
"\\.(css|less|scss|sss|styl)$": "identity-obj-proxy",
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)(\\?.+)?$": "identity-obj-proxy",
"^api(.*)$": "<rootDir>/src/api$1",
"^assets(.*)$": "<rootDir>/src/assets$1",
"^components(.*)$": "<rootDir>/src/components$1",
"^constants/(.*)$": "<rootDir>/src/constants/$1",
"^images(.*)$": "<rootDir>/src/assets/images$1",
"^hocs(.*)$": "<rootDir>/src/hocs$1",
"^hooks(.*)$": "<rootDir>/src/hooks$1",
"^pages(.*)$": "<rootDir>/src/pages$1",
"^src(.*)$": "<rootDir>/src$1",
"^style(.*)$": "<rootDir>/src/style$1",
"^store(.*)$": "<rootDir>/src/store$1",
"^types(.*)$": "<rootDir>/src/types$1",
"^utils(.*)$": "<rootDir>/src/utils$1"
}
}

0 comments on commit cd03f1c

Please sign in to comment.