Live coding help from Git and Emacs
A small git script and two lisp functions can go a long way in helping you "live code" in a prepared and controlled matter at conferences.
Sinon.JS 0.6.0 - Fake XMLHttpRequest and improved test framework integration
Sinon.JS 0.6.0 is out and it features a new FakeXMLHttpRequest object and a high-level interface for testing xhr-dependent code along with improvements to sinon.sandbox and sinon.test.
Full article Sinon.JS 0.6.0 - Fake XMLHttpRequest and improved test framework integration.
Sinon.JS 0.5.0 Released
I've been holding off releasing Sinon until it's "done". Luckily, @augustl kicked me for not "releasing early, releasing often", so I got my act together.
Faking Timers and Dates with Sinon
In addition to low-level tools for stubbing and mocking and high-level tools to integrate with test runners, Sinon provides a few useful utilities. This post explains the first of these, which is fake timers and Dates.
Stepping Through JsTestDriver Tests
Sometimes it's useful to split largish JsTestDriver test suites into smaller chunks for debugging, or for slower runs. Here's a quickie little script I wrote to do just that.
Higer-level Stubbing and Mocking Tools in Sinon
Having covered the basic Sinon interface in one and a half posts I want to show you some of the higher-level tools Sinon brings to the table to reduce the amount of ceremony required to add stubs and mocks to your JavaScript tests. Hopefully, these tools will make it dead simple to properly integrate Sinon with any xUnit style test framework.
Full article Higer-level Stubbing and Mocking Tools in Sinon.
Test Spies, Stubs and Mocks - Part 1.5
While presenting the core Sinon interface yesterday i unintentionally left out parts of the API. To make up for the mistake, here are the missing pieces.
JavaScript Test Spies, Stubs and Mocks
One of the things coming out of me recently writing a book (apart from, you know, a book) is a JavaScript stubbing and mocking library (still in the making) called Sinon. This is the first of a total of three posts giving a preview on the API. Hopefully some of you want to share your ideas and feedback on it.
Update on the node.js asserts
I realized that if you want the assert-extras assertions, you probably want the built-in assertions as well.
Unit testing node.js apps
Recently I've been dabbling in the fantastic library that is node.js. Whenever I enter a new development environment I immediately poke around to figure out how to unit test things. I'm uncomfortable writing too much code without tests, especially when I'm on unfamiliar grounds. Here's what I landed on in round one.
About cjohansen.no
Personal blog of Christian Johansen, on test driven development, open source, emacs and more.
Latest comments
- Christian and Clotho on Sinon.JS 0...
- Christian and Matthew on Sinon.JS...
- Christian and Andrew on Test Spies...
- Christian and August on Faking Tim...
- Christian and Andrew on Higer-leve...