Sinon with PhantomXHR - Window.sinon is undefined

55 Views Asked by At

I am using CasperJS along with PhantomXHR. When I run the code in webkit version I can able to mock the response but the same script is not working in Firefox using --engine= slimerjs. It launches the Firefox browser and shows the Page error as window.sinon is undefined. Any solution to get rid of this issue. Are PhantomXHR + sinon will support with slimerjs?

1

There are 1 best solutions below

0
Oasis On BEST ANSWER

After so much struggle i have found that gloabl variable assigned to window is causing the issue.Just use sinon instead of window.sinon in phantomxhr