-
Notifications
You must be signed in to change notification settings - Fork 988
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
Backend test setup #140
Backend test setup #140
Conversation
For code coverage, will the missed branch or line be shown to the user? I'm curious how they can know what has caused the coverge to fail |
Will be the tests only available to run in GH CI/CD or is it possible to run test locally? Example |
Possible to run test locally. Dev can do: |
Lastly, i didn't see a coverge threshold defined unless there is a default? https://jestjs.io/docs/configuration#coveragethreshold-object @dangtony98 can you also review the index.ts file to make sure you are up to date with the new restructure? |
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.
There are some questions I'm curious about. Overall not seeing any major security or design flaw. There needs to be more work on some parts towards consistent type definition and error handling. I will be working on central error handling but first I need this PR to be merged into main
for me to start working on some changes.
That's correct. Because there's no test yet, aside from the initial one that I added. If we define the threshold, the run will fail. 😉 For now, I plan to just start with this, and add more tests as we move forward. Once we reach 50%, I would suggest we set the threshold and then aim higher. 👍 |
❤️
That's consistent with my rationale of opening this PR as early as now 👍 |
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.
I'm okay with current state of this code. Waiting for your review @dangtony98
index.ts
to separate parts for easier test setupSample:
Test result:
Coverage annotations:
Note: some files were automatically modified by prettier on commit (husky?).