X Tutup
Skip to content

[PECO-1390] Configure Typescript for tests#256

Merged
kravets-levko merged 2 commits intomainfrom
typescript-for-tests
Apr 29, 2024
Merged

[PECO-1390] Configure Typescript for tests#256
kravets-levko merged 2 commits intomainfrom
typescript-for-tests

Conversation

@kravets-levko
Copy link
Copy Markdown
Contributor

@kravets-levko kravets-levko commented Apr 23, 2024

PECO-1390

  • Configured nyc to run tests via ts-node;
  • All imports in tests updated to use /lib instead of /dist so nyc can properly collect coverage data. A great side-effect of this - no longer need to build sources before runing tests;
  • For now, all tests are still in .js files and still have to use require. Migrating all tests to TS would be a very massive change, so it will be done gradually in follow-up PRs.

After merging this PR, a slight (<1%) difference in code coverage may be caused by testing original sources vs. compiled+source maps, and using ts-node instead of regular node.

Signed-off-by: Levko Kravets <levko.ne@gmail.com>
Signed-off-by: Levko Kravets <levko.ne@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.56%. Comparing base (1e4b730) to head (4180896).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
- Coverage   92.68%   92.56%   -0.12%     
==========================================
  Files          64       65       +1     
  Lines        1545     1547       +2     
  Branches      273      273              
==========================================
  Hits         1432     1432              
- Misses         47       49       +2     
  Partials       66       66              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kravets-levko kravets-levko merged commit fac3345 into main Apr 29, 2024
@kravets-levko kravets-levko deleted the typescript-for-tests branch April 29, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup