jasmine.clock().install() throws error

See original GitHub issue
beforeEach(function() {
  jasmine.clock().install();
});

throws Jasmine Clock was unable to install over custom global timer functions. Is the clock already installed?

beforeEach(function() {
  jasmine.clock().uninstall();
  jasmine.clock().install();
});

Fixed my issue.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:23
  • Comments:10

github_iconTop GitHub Comments

9reactions
devBrunoLinscommented, Sep 24, 2018
beforeEach(function() {
  jasmine.clock().install();
});

throws Jasmine Clock was unable to install over custom global timer functions. Is the clock already installed?

beforeEach(function() {
  jasmine.clock().uninstall();
  jasmine.clock().install();
});

Fixed my issue.

This fix my issue to

9reactions
mygoodgomezcommented, Jun 25, 2015

In the Jasmine docs, they give this example:

beforeEach(function() {
    timerCallback = jasmine.createSpy("timerCallback");
    jasmine.clock().install();
});

afterEach(function() {
    jasmine.clock().uninstall();
});

I ran into the issue as well, and I guess uninstalling it is the solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conflict between zone.js and Jasmine's clock - Stack Overflow
This creates a conflict with Jasmine's clock. For example, the following test fails with the error, Error: Jasmine Clock was unable to install...
Read more >
jasmine.clock().install() throws error - Bountysource
clock().install(); });. throws Jasmine Clock was unable to install over custom global timer functions. Is the clock already installed?
Read more >
Introduction - Jasmine Documentation
¶. Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of...
Read more >
Component testing scenarios - Angular
fakeAsync() is not needed and throws an error if nested. ... before loading zone.js/testing beforeEach(() => { jasmine.clock().install(); }); afterEach(() ...
Read more >
Diff - 085b489add939e1dcdd2b7e048a6c40671e982cc^!
Install Dependencies - -Jasmine Core relies on Node.js. ... function() { - it("should throw an exception if song is already playing", ...
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