dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

WIP: Update tap

Open Qard opened this issue 1 year ago • 1 comments

What does this PR do?

Update tap to help eliminate dependency on nyc.

Motivation

NYC is built on istanbul which was abandoned years ago. It has some dependency vulnerability warnings which will never be resolved.

Additional Notes

This is still a work-in-progress. Tap 18 seems to have made some significant changes in the rewrite in which they eliminated the nyc dependency. Lifecycle hook functions no longer accept a done callback, only sync or promise-returning forms now. Hooks trigger not just around tests but around describe suites too which results in sinon failures when we use describes recursively as it tries to patch already patched functions and then crashes.

I'm working on figuring out ways to resolve the behavioural differences without needing to rewrite all our tests, though I'm not yet sure how to deal with the describe nesting problem. 🤔

Security

Datadog employees:

  • [ ] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • [x] This PR doesn't touch any of that.

Qard avatar Mar 07 '24 02:03 Qard

Codecov Report

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

Project coverage is 69.19%. Comparing base (d73cc7c) to head (d316906). Report is 227 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4147       +/-   ##
===========================================
- Coverage   85.21%   69.19%   -16.03%     
===========================================
  Files         247        1      -246     
  Lines       10883      198    -10685     
  Branches       33       33               
===========================================
- Hits         9274      137     -9137     
+ Misses       1609       61     -1548     

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

codecov[bot] avatar Mar 07 '24 02:03 codecov[bot]