Closed xuxey closed 1 year ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π‘ | Statements | 68.31% (+62.7% πΌ) |
291/426 |
π΄ | Branches | 7.5% (+7.5% πΌ) |
3/40 |
π΄ | Functions | 30.51% (+25.42% πΌ) |
18/59 |
π‘ | Lines | 64.8% (+60.56% πΌ) |
243/375 |
12 tests passing in 10 suites.
Report generated by π§ͺjest coverage report action from be30bfce07c0c55e591c3ab36a0a5b4218533a9b
This PR adds a testing framework to write automated tests via Jest, per issue #14
Unit tests are defined in
*.spec.ts
files, and mocks can be injected within the beforeEach columns. Useattendees.service.spec.ts
as a reference point to write future tests.The CI suite runs the test suite for PRs and commits to main, as well as for branches starting with "test"
Side notes @rohannunu The sample tests are written on an outdated version of the schema. Please make sure to update these tests for the create function once this PR is merged in.
@aniketgargya since we're using the connection object directly for transactions, I've found a temporary workaround that injects a real connection to the dev mongo cluster.