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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle missing stack when throwing recursion errors #401

Merged
merged 2 commits into from Sep 22, 2021

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Sep 21, 2021

This is for #398 which I think we should land and release as 8.0.1. Guards against the error and falls back to the behavior of v7

@SimenB SimenB requested a review from fatso83 September 21, 2021 14:43
@@ -109,6 +109,7 @@ const globalObject = require("@sinonjs/commons").global;
* @property {number} createdAt
* @property {boolean} immediate
* @property {number} id
* @property {Error} [error]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is how you say optional?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so

src/fake-timers-src.js Outdated Show resolved Hide resolved
@fatso83
Copy link
Contributor

fatso83 commented Sep 22, 2021

So ... what's the order of things here? #398 and then #401 and then #402?

@SimenB
Copy link
Member Author

SimenB commented Sep 22, 2021

I think this, release, then figure out what to do in #398 (I'm not totally happy with it)

@SimenB
Copy link
Member Author

SimenB commented Sep 22, 2021

I'll rebase both to trigger CI 🙂

@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #401 (e4d9c9c) into master (f434b69) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #401      +/-   ##
==========================================
+ Coverage   93.85%   93.87%   +0.02%     
==========================================
  Files           1        1              
  Lines         586      588       +2     
==========================================
+ Hits          550      552       +2     
  Misses         36       36              
Flag Coverage Δ
unit 93.87% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/fake-timers-src.js 93.87% <100.00%> (+0.02%) ⬆️

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 f434b69...e4d9c9c. Read the comment docs.

@fatso83 fatso83 merged commit 14db72f into sinonjs:master Sep 22, 2021
@SimenB SimenB deleted the missing-recursion-error branch September 22, 2021 22:12
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

3 participants