https://github.com/nascript/learn-unit-testing
https://github.com/nascript/learn-unit-testing
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nascript/learn-unit-testing
- Owner: nascript
- Created: 2022-07-10T04:39:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-13T15:20:41.000Z (over 3 years ago)
- Last Synced: 2025-01-23T05:14:52.654Z (about 1 year ago)
- Language: JavaScript
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## LEARN UNIT TESTING WITH JEST
### Jest tidak support javascript module
oleh karena itu diperlukan babel js untuk membantu jest mengkonversi javascript module Es6 ke javascript versi yang lama yaitu common js
[LINK babel setup](https://babeljs.io/setup#installation)
### CLI Dasar JEST
- `npx jest` to run jest
- `npx jest --testNamePattern "nama/desc function test"` to test by specifik description function test
- `npx jest --runTestsByPath "nama file test.js"` to test by file test.js