Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

how do i stub/mock performance.now() using sinon.js?

$
0
0

@kumar_b wrote:

I am writing unit tests in Ember-qunit. I want to set a custom value on performance.now.

I tried sinon.stub(performance,'now', 60000); but this didn’t work. I get TypeError: stub(obj, 'meth', fn) has been removed.

how do i stub/mock performance.now() using sinon.js?

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles