Monday, October 31, 2022

Jest testing framework for React & Node.js

https://jestjs.io/docs/getting-started

{
"name": "project",
"version": "1.0.0",
"description": "API",
"main": "src/server.js",
"scripts": {
"test": "jest",
"test-watch": "jest --watchAll",
"start": "node src/server.js",
"watch": "nodemon src/server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"csv-parse": "^5.3.1",
"express": "^4.18.2",
"morgan": "^1.10.0"
},
"devDependencies": {
"jest": "^29.2.2",
"supertest": "^6.3.1"
}
}

npm i jest --save-dev

npm i supertest --save-dev

No comments:

Post a Comment