vendredi 20 mars 2020

stub performance.now() using Sinon.js

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 performance.now() using sinon.js?

Thanks




Aucun commentaire:

Enregistrer un commentaire