-
Notifications
You must be signed in to change notification settings - Fork 46
Feature/stock management implementation #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/stock management implementation #39
Conversation
@BravarDev solve conflicts |
@BravarDev any updates? |
Sorry for the time, i will fix it. |
@BravarDev pls also solve conflicts |
Finished, check it out |
src/utils/user-utils.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
src/utils/test-utils.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
src/utils/errors.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
src/tests/setup.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
src/config/ormconfig.test.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this change, it's not necesary
🚀 StarShop Pull Request
Mark with an
x
all the checkboxes that apply (like[x]
)📌 Type of Change
📝 Changes description
I implemented two key functions in a service responsible for managing product variants' stock levels:
ProductVariant
by its ID.Both functions ensure data consistency when managing product stock during purchases and order cancellations. Also I implement unit test for both functions in the
productVariantService.spec.ts
file, when running this test I had to fix some configurations in the assert functions but everything went fine.📸 Evidence (A photo is required as evidence)
All tests succesfully approved

⏰ Time spent breakdown
It took me around 20 minutes to explore the project and understand the connections, also to see if the project was full NestJS or if it is configured to be in express.
Once adapted i invest like hour and a half to create the functions and then build the tests
🌌 Comments
The service is not conected to any controller, so in case of real testing, the api does not support product operations.