No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
manpreet
Best Answer
2 years ago
i'm currently developping a nodejs/express rest api (personal project), and i wanted to learn as much as i ca from this project.
So in my project i'm using
sequelize
as anORM
layer, i have a model named `bus, and i have build CRUD endpoint to this model.now i want to do some test this model/api i have developped, i read some tutorial about testing and found that there are multiple type of testing seperated in two big categories : white-box vs black-box.
So i have written some integration tests that test my api(integration test are black-box testing)
and i want right know to write some unit-testing, but i don't know what to test, the
bus
model is a Sequelize model, so everything that i would test would be already tested in thesequelize
library it self. and testing the api endpoints is done via integration tests.PS: its my first time writing tests.
i'm using the following technologies :
nodejs
,sequelize
,express
,mocha
,chai
.Bus Model Definition
Bus Api endpoint testings