question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timecop is freezing tests

See original GitHub issue

We are using https://github.com/matteodepalo/ember-cli-timecop in a few component integration tests and until now this worked fine. We tried to convert those tests to use the new testing APIs, but now Timecop.freeze() seems to block the async render(...) call from continuing.

An issue similar to this has existed in the past where Backburner.js would not continue running when Date.now() is mocked and frozen, but was fixed by getting a reference to the Date object on startup and then using that reference instead of the temporary mocked global.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Nov 15, 2017

If you have the time, could you put together a repo I could use for testing / experimenting with this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

travisjeffery/timecop - GitHub
A gem providing "time travel" and "time freezing" capabilities, making it dead simple to test time-dependent code. It provides a unified method to...
Read more >
Timecop vs Rails TimeHelpers - Grinding Gears - FreeAgent
This flakiness can be eliminated by including Timecop and calling Timecop.freeze at the beginning of this test. This will cause the current ...
Read more >
Timecop: Freeze Time in Ruby Development for Better Testing
How to improve your rails development by freezing time for better testing.
Read more >
Change time like Time Cop while testing in Ruby on Rails
Freeze time or travel back or future in time while testing Ruby on Rails application easily using Time Cop gem.
Read more >
Stubbing Time in Capybara Specs | Geoff Harcourt
Timecop is only able to affect the time in Ruby-land on the server, so using Timecop in a system spec will lead to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found