Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replaces c8 with node native coverage #46

Merged
merged 3 commits into from
May 12, 2024

Conversation

sverweij
Copy link
Owner

Description

  • replaces c8 with node 'native' --experimental-test-coverage

Motivation and Context

c8 in our setup always returned 100% coverage for all things - which might have to do with an issue in tsx (see tsx #433 ), but might just as well be caused by something unexpectedly breaking in de nodejs / v8 w.r.t. loader coverage.

--experimental-test-coverage is not perfect either (i.c.w. tsx it's unstable on node > 20.12.2, and line numbers are off), but at least the coverage data we get is more realistic.

How Has This Been Tested?

  • green ci

Screenshots

> tsx --experimental-test-coverage --test-reporter ./tools/dot-with-summary.reporter.js --test src/*.spec.ts src/**/*.spec.ts

.................................................

49 passing (1.420 ms)

=============================== Coverage summary ===============================
Branches     : 97,89 % (93/95) NOK
Functions    : 100 % (38/38)
Lines        : 99,76 % (422/423)
================================================================================

Uncovered lines:
  /Users/sander/prg/js/watskeburt/src/git-primitives.ts:80

Uncovered branches:
  /Users/sander/prg/js/watskeburt/src/git-primitives.ts:79
  /Users/sander/prg/js/watskeburt/src/main.ts:22

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation only change
  • Refactor (non-breaking change which fixes an issue without changing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore

Checklist

  • 馃摉

    • My change doesn't require a documentation update, or ...
    • it does and I have updated it
  • 鈿栵笍

    • The contribution will be subject to The MIT license, and I'm OK with that.
    • The contribution is my own original work.
    • I am ok with the stuff in CONTRIBUTING.md.

Copy link

socket-security bot commented May 12, 2024

Removed dependencies detected. Learn more about Socket for GitHub 鈫楋笌

馃毊 Removed packages: npm/c8@9.1.0

View full report鈫楋笌

@sverweij sverweij force-pushed the chore/replace-c8-with-native-coverage branch from e00902e to 0ef72bd Compare May 12, 2024 11:27
@sverweij sverweij merged commit fdbe28e into main May 12, 2024
5 checks passed
@sverweij sverweij deleted the chore/replace-c8-with-native-coverage branch May 12, 2024 12:30
sverweij added a commit that referenced this pull request May 20, 2024
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.

None yet

1 participant