Add sinon.js to test.html
Refactor mock macro to use recursive expansion
Reformat test