-
Notifications
You must be signed in to change notification settings - Fork 89
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
Clean up our tests in preparation for the testing sprint #2466
Conversation
8956e6e
to
c257089
Compare
757daff
to
cf1087b
Compare
cf1087b
to
31a1c5e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## livekit #2466 +/- ##
===========================================
- Coverage 25.02% 17.13% -7.89%
===========================================
Files 47 143 +96
Lines 2382 19297 +16915
Branches 434 249 -185
===========================================
+ Hits 596 3307 +2711
- Misses 1735 15990 +14255
+ Partials 51 0 -51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Regarding f79ca02, could we instead just change the linters' search paths to find test files? Personally I prefer having test files in their own directory, as it makes it easier to separate them from source files & many of our projects put tests in a separate directory (aside from the Rust projects where tests are within source files). |
Hmm, my experience is that separation from the source files, at least for unit tests, just adds friction. When re-organizing files or directories, it becomes really easy to find the test files and make sure you're moving them at the same time as the code. I believe this is one of the reasons why you see Rust and Vitest even moving tests into the source file nowadays. @toger5 Do you have any preference here? |
31a1c5e
to
5e4a028
Compare
I like it when the tests are on the same level where they test. I like if a function that does not require any context mocking but just validates a type for instance does not leave the scope of the file. So having the test in the file is nice here. This comment is not too helpful to find an immediate solution I think. It depends on what kind of tests we are mostly writing. |
Concluded in stand-up to keep the test files inside src, as I've done here. This is ready for review then |
5e4a028
to
d591eac
Compare
5f6ca00
to
b75fbb1
Compare
Turning on a coverage gate for Codecov was pretty easy once I managed to find the right page of the docs: https://docs.codecov.com/docs/commit-status#patch-status I've included that coverage gate configuration in this PR. |
b75fbb1
to
7012e66
Compare
531f1a8
to
39405a6
Compare
95f92f5
to
d45e049
Compare
d45e049
to
f1e18d3
Compare
f4c60ea
to
fb67fd5
Compare
I am looking into this. Initially I was able to reproduce the issues locally. After some time I also had them running without changing sth significantly. One finding is that having multiple async tests results in running the tests failing and having only one async seems to work. (but I am not sure if this is just random with a bias after all) After some iterations I concluded the following:
|
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.
This is missing two tests now but has all the minor things fixed to get through ci.
See the commit messages for the details!