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

Update sinon and rewire #8622

Closed
garethbowen opened this issue Oct 9, 2023 · 0 comments · Fixed by #8638
Closed

Update sinon and rewire #8622

garethbowen opened this issue Oct 9, 2023 · 0 comments · Fixed by #8638
Assignees
Labels
Dependencies Update the project's dependencies/libraries Type: Technical issue Improve something that users won't notice
Milestone

Comments

@garethbowen
Copy link
Member

Describe the issue
We're a long way behind on sinon and rewire.

Describe the improvement you'd like
Upgrade.

When I tried this the naive way I got errors when using the use fake timers functionality. I think you can now only use it once and you must use it before using rewire. I fixed a couple of places but there were too many and I backed out. eg:

  6) mutingUtils
       updateMuteState
         should return next reports, sorted by date, when requested:
     TypeError: Can't install fake timers twice on the same global object.
      at Object.install (/home/runner/work/cht-core/cht-core/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js:1663:19)
      at createClock (/home/runner/work/cht-core/cht-core/node_modules/sinon/lib/sinon/util/fake-timers.js:17:33)
      at exports.useFakeTimers (/home/runner/work/cht-core/cht-core/node_modules/sinon/lib/sinon/util/fake-timers.js:49:16)
      at Sandbox.useFakeTimers (/home/runner/work/cht-core/cht-core/node_modules/sinon/lib/sinon/sandbox.js:416:48)
      at Context.<anonymous> (test/unit/lib/muting_utils.js:684:21)
      at processImmediate (node:internal/timers:466:21)

https://github.com/medic/cht-core/actions/runs/6216359943/job/16870140492

@garethbowen garethbowen added Type: Technical issue Improve something that users won't notice Dependencies Update the project's dependencies/libraries labels Oct 9, 2023
@dianabarsan dianabarsan self-assigned this Oct 11, 2023
@dianabarsan dianabarsan added this to the 4.5.0 milestone Oct 12, 2023
@dianabarsan dianabarsan linked a pull request Oct 12, 2023 that will close this issue
5 tasks
garethbowen added a commit to medic/cht-docs that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Update the project's dependencies/libraries Type: Technical issue Improve something that users won't notice
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants