3 ms·
I've been setting up client side testing with grunt+browserify+karma+jasmine lately. It's pretty freaking powerful. But, none of the usual suspects for mocking
by warfangle 13y ago
I've been setting up client side testing with grunt+browserify+karma+jasmine lately. It's pretty freaking powerful. But, none of the usual suspects for mocking http.get requests work well with it (sinon fails to execute in a browserify test environment; nock expects to be running in a node environment with the ClientRequest object available).
- ulisesrmzroche 13y agowhy is sinon failing to execute in browserify? It's supposed to be stand-alone. Is it being included correctly?
- warfangle 13y agohttps://github.com/cjohansen/Sinon.JS/pull/358 https://github.com/cjohansen/Sinon.JS/pull/358 Longer story: using npm to install sinon; shimming sinon in my karma browserify plugin config (`'sinon' : 'global:sinon'`)since it doesn't follow CommonJS; using browserify (and the karma browserify plugin) to require('sinon'); sinon is undefined after var sinon = require('sinon'). Might be something up with my config, but none of the other non-commonjs modules I shim (jquery, swfobject) have the same issues.