forcedotcom / LightningTestingService

Apache License 2.0
122 stars 35 forks source link

Mocking the internal clock in jasmine #90

Closed filiprafalowicz closed 4 years ago

filiprafalowicz commented 5 years ago

Guys,

I am trying to test my implementation of debounce function and it requires mocking internal clock in jasmine. I used similar code as mentioned here: https://bambielli.com/til/2016-03-02-jasmine-mock-clock/ But when I call jasmine.clock().install(); in beforeEach function, I get: TypeError: Cannot assign to read only property 'setTimeout' of object '[object Object]'.

Can you guys help me?