tape-testing / tape

tap-producing test harness for node and browsers
MIT License
5.77k stars 307 forks source link

Preserve stacktraces for async/await #537

Closed Raynos closed 3 years ago

Raynos commented 3 years ago

We use self.ifError(err) instead of self.fail() which logs the original stacktrace instead of creating a new Error object.

Fixes #536

Raynos commented 3 years ago

Addressed feedback.

Raynos commented 3 years ago

Cleaned up the test, this looks good to merge to me.

ljharb commented 3 years ago

I’m going to land #538 first and rebase this, so i can be sure tests pass in all relevant node versions, and then I’ll land this one.

codecov-io commented 3 years ago

Codecov Report

Merging #537 (d505cdf) into master (82c3904) will decrease coverage by 0.02%. The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
- Coverage   73.87%   73.84%   -0.03%     
==========================================
  Files          19       19              
  Lines         754      757       +3     
  Branches      145      146       +1     
==========================================
+ Hits          557      559       +2     
- Misses        197      198       +1     
Impacted Files Coverage Δ
lib/test.js 95.97% <75.00%> (-0.28%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 82c3904...d505cdf. Read the comment docs.

ljharb commented 3 years ago

I'll fix these last failing tests, and land this tonight.