Open MattGould1 opened 1 year ago
Hi @MattGould1 , you are welcome to contribute setup jest and supertest for backend
Hello! I'd like to contribute to this project. Is anyone there working in this proposal? Maybe I could be help or if anyone is working on it I can take it and try 👍
Can I take up this issue?
@Vishrut19 @Zewenaco you are welcomed to contribute on this issue
hey Can I get ER Diagram
@parteekcoder @salahlalami Has anyone started on this issue?
I've created a unit test suite for the controllers and would welcome any feedback or suggestions you might have.
Can I create tests for both frontend and backend? Can I add test cases? Is this project still active?
Hey,
I'd like to get your opinions on introducing Jest for unit testing on the backend and then secondary to that, creating a way to create test data for the unit tests.
I would propose changing a few structures first, for our controllers we have the file paths of
Controllers
controllers/erpControllers/adminController.js
I would propose to change this to
This could then be extended later to include
index.test.integration.ts
for integration tests.Models
Currently we have our model files like so
models/erpModels/Admin.js
I'd like to change this so that a model can also have a generator to create the test data for that model.
Generate.js
The generate.js would look something like:
Test Data
We would want a way to create test data on the fly for whatever purpose it is required and be able to relate the data. I'd propose something like below:
This would create:
1 Admin, 3 Employee's, 1 Expensive which has an Expense cateogry and 1 Expense Category that belongs to an Expense