Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zahid-automate/typescript-api-automation
https://github.com/zahid-automate/typescript-api-automation
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/zahid-automate/typescript-api-automation
- Owner: Zahid-Automate
- Created: 2024-03-07T21:18:57.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T03:24:24.000Z (8 months ago)
- Last Synced: 2024-03-29T23:21:55.748Z (8 months ago)
- Language: TypeScript
- Size: 496 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Setup
Install packages:
npm install --save-dev supertest
npm install --save-dev ts-jest
npm i @types/[email protected] (make sure to match with @types/jest dependency)
npm install --save @types/jest
npm install --save @types/supertest
Package.json file should look like below after all the above commands are run
Add tsconfig.json file with below details
Run test
npx jest {filename}Reporting with Jest using Junit
npm install jest-junit --save-dev
==> Include the reporters section in jest.config.js as per below
Sample junit xml report will look like below
Adding a Jest HTML report
npm install jest-html-reporters --save-dev
==> Include the jest-html-reporters in jest.config.js as per below
Sample jest HTML report will look like below
![_C__Users_mzahi_Desktop_TypeScript-API-Automation_reports_jest_html_reporters html(iPad Pro)](https://github.com/Zahid-Automate/TypeScript-API-Automation/assets/45691238/e06fe1b1-86e2-42d2-babd-79650180437d)