I want to use should.js together with mocha in a Node.js projects which I write in Coffeescript.
In pure Javascript a expression in should.js is like
(function(){
throw new Error('fail');
}).should.throw();
Now I want to write the same expression in Coffeescript. Something like
object.function().should.throw
But that compiles to
object["function"]().should["throw"];
Where is my mistake in my Coffescript code?