Mission-Prerna / nl-apis

All the BE APIs to configure, manage & run the NL app
1 stars 16 forks source link

Testing Suite Setup for Core flows #100

Closed tushar5526 closed 1 month ago

tushar5526 commented 9 months ago

Context: https://github.com/Mission-Prerna/nl-apis/pull/99

I have added a unit test that works, but we can't move it to GHA yet. I would need to invest more time in this to fix:

Use test containers for each test run. Reduce the seed data script so that it can be loaded quickly into test containers. Jest tests currently don't terminate and hang after running successfully with an error saying Jest did not exit one second after the test run was completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

which will need some time to investigate.

nikhil241 commented 1 month ago

@karntrehan and @dhruv-1001

  1. Write Comprehensive Tests: Use Jest to focus on unit tests for key components.
  2. Set Up GitHub Actions for CI: Automate testing and code coverage reporting with GitHub Actions.
  3. Integrate Codecov: Upload and monitor coverage data using Codecov.
  4. Add Badges to README Display build status and coverage badges.
karntrehan commented 1 month ago

Detailed analysis on:

AakashSatpute119 commented 1 month ago
karntrehan commented 1 month ago

Doc link: https://docs.google.com/document/d/1o5UlgHorjGCNRLB3Kus1IWV7CqT5N3Dfafy6EY3w1T0/edit?usp=sharing

dhruv-1001 commented 1 month ago

@nikhil241 to raise a PR today.

nikhil241 commented 1 month ago

@nikhil241 to raise a PR today.

PR is raised for data-services https://github.com/NipunSahAIyak/data-service/pull/55/ .

Here's the coverage screenshot of Jest

image

nikhil241 commented 1 month ago

@nikhil241 to raise a PR today.

PR is raised for data-services NipunSahAIyak/data-service#55 .

Here's the coverage screenshot of Jest

image

This is related to the data-service, so I moved this conversation to the NISAI project for tracking.

karntrehan commented 1 month ago

To be closed today.

AakashSatpute119 commented 1 month ago