You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.
varbar=require('bar');// I want to mock foo.describe('bar',function(){it('calls foo',function(){// how would you go about doing this?});});
My solution was to add a method onto window that would allow you to do this following:
// bar.stub.test.js
varmock=sinon.mock();varbar=requireAndInject('bar',{'../foo', mock);// I want to mock foo.describe('bar',function(){it('calls foo',function(){mock.once();bar();mock.verify();});});
I can submit a pull request if deemed helpful. This seems to be the only solution for browser testing rendr apps.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is it possible to inject module dependencies into stitched files for client side testing purposes?
E.g.,
// bar.js
// bar.test.js
My solution was to add a method onto window that would allow you to do this following:
// bar.stub.test.js
I can submit a pull request if deemed helpful. This seems to be the only solution for browser testing rendr apps.
The text was updated successfully, but these errors were encountered: