Running Unit Tests written in CoffeeScript
Chutzpah supports running unit tests you write in the CoffeeScript
. There is an example of this for CoffeeScript in the samples folder
For example given a CoffeeScript test file that references another CoffeeScript file:
## <reference path="../code/code.coffee" />
test "A basic test", ->
ok true, "this test is fine"
value = "hello"
equal "hello", value, "We expect value to be hello"
Chutzpah will parse that file as well as the referenced code.coffee file and search for matching .js files that your compile step generates. Notice the syntax for referencing other files. For CoffeeScript files Chutzpah uses comments that start with ##
to indicate a reference declaration.