8. Anatomy of a test - Harness Harness.configure({ testClass : Siesta.Test.jQuery, preload : [ // Jquery CDN 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.js' ] }) ; Harness.start( '010_hello_world.t.js’, .... );
9. Anatomy of a test StartTest( function (t) { t.diag( 'Testing jQuery...' ); $( 'body' ).html( 'JQuery was here' ); t.like(document.body.innerHTML, 'JQuery was here' , 'Found correct text in DOM' ); });
10. If you’re not unit testing, you’re not refactoring. You’re just changing shit. Wise man once said...