https://github.com/webbestmaster/css-module-typescript-loader
CSS Module Typescript Loader
https://github.com/webbestmaster/css-module-typescript-loader
Last synced: 6 months ago
JSON representation
CSS Module Typescript Loader
- Host: GitHub
- URL: https://github.com/webbestmaster/css-module-typescript-loader
- Owner: webbestmaster
- License: mit
- Created: 2024-05-13T19:57:15.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T22:19:51.000Z (almost 2 years ago)
- Last Synced: 2024-10-08T02:09:20.473Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.autotest.md
- License: license
Awesome Lists containing this project
README
### Autotests
#### End-to-End test: jest + puppeteer
Required libraries:
1. jest
2. ts-jest
3. @types/jest
4. puppeteer
5. @types/puppeteer
Running example:
```bash
$ jest ./test-e2e/ [--runInBand]
```
`--runInBand` - run tests sequentially
#### Unit test: jest + react-*
Required libraries:
1. jest
2. ts-jest
3. @types/jest
4. @testing-library/react
5. @testing-library/jest-dom
6*. use https://mswjs.io/ to make http request
7*. use https://github.com/testing-library/react-hooks-testing-library to test react hooks
Jest config `./jest.config.js`
```javascript
// eslint-disable-next-line unicorn/prefer-module
module.exports = {
globals: {
'ts-jest': {
tsconfig: './tsconfig.test.json',
},
},
modulePathIgnorePatterns: ['/tsc-check/'],
preset: 'ts-jest',
setupFilesAfterEnv: ['./test-unit/setup-jest.ts'],
testEnvironment: 'jsdom', // @testing-library/jest-dom
testTimeout: 10e3,
};
```
Running example:
```bash
$ jest ./test-unit/ --coverage
```