Thanks for the tip on sinon.js. I originally looked at qmock, but it appears to be between releases right now with much of the documentation TK, and my code-reading-foo isn't yet strong enough to figure out how to make it work without some nice docs to help me out. Sinon's been working well for me so far, though!
On May 11, 6:11 pm, Gregers Gram Rygg <[email protected]> wrote: > You might want to check out sinon.js to help you with stubs, mocks, > spies, fake timers, fake XHR, sandboxing, ++. Works with any js > unit-testing framework.http://sinonjs.org/ > > It's written by Christian Johansen, the author of the book > "Test-Driven JavaScript Development". Which explains stubs, mocks, > fakes, spies and a whole lot more related to writing and testing > JavaScript code.http://tddjs.com/ > > Cheers, > GregersOn Wed, May 11, 2011 at 3:35 PM, Philip Schweiger <[email protected]> > wrote: > > I received a reply directly via email (poster had tried, but been > > unsuccessful at posting to the group) that referenced a couple of > > useful article. I am posting it here as others with the same question > > as my may also find it useful. > > > --- > > > On Tue, May 10, 2011 at 12:58 PM, Anatoly Geyfman wrote: > > > Usually you'd want to use some sort of mock/stub objects for testing > > third-party libraries. Essentially, you want to completely replace the > > third-party dependencies in your code w/ either stubs for those > > dependencies (in case you have some canned responses you want to test > > your code against) or mocks (in case you want to ensure what you're > > sending to FB is correct). > > > check out Jeff Atwood's take on stubs/mocks/etc: > >http://www.codinghorror.com/blog/2007/01/test-doubles-a-taxonomy-of-p... > > > and Martin Fowler's discussion of mocks/stubs: > >http://martinfowler.com/articles/mocksArentStubs.html > > > -- > > To view archived discussions from the original JSMentors Mailman list: > > http://www.mail-archive.com/[email protected]/ > > > To search via a non-Google archive, visit > > here:http://www.mail-archive.com/[email protected]/ > > > To unsubscribe from this group, send email to > > [email protected] -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
