nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
124 stars 40 forks source link

fix: refactor ingest.test.ts to remove dependencies between tests #1172

Closed Julusian closed 2 months ago

Julusian commented 2 months ago

About the Contributor

This pull request is posted on behalf of the BBC.

Type of Contribution

This is a: Code improvement

Current Behavior

This set of unit tests is all dependent on the previous test to get the correct result. This level of inter-dependency makes it hard to debug the tests, as you can't single out a single failing test to debug it.

New Behavior

The tests have been reworked so that each test sets up the environment from scratch, making it possible to use test.only( on any test in the file.

Time Frame

Not urgent, but we would like to get this merged into the in-development release.

Other Information

Status

Julusian commented 2 months ago

The CI failures look to be caused by another change in your release51 branch, and are not related to this change

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.75%. Comparing base (e8cec88) to head (8c4b93a). Report is 1 commits behind head on release51.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release51 #1172 +/- ## ============================================== + Coverage 57.99% 74.75% +16.75% ============================================== Files 518 33 -485 Lines 83619 4119 -79500 Branches 4336 388 -3948 ============================================== - Hits 48499 3079 -45420 + Misses 35068 1039 -34029 + Partials 52 1 -51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.