An extension for Buster.JS to automatically compile your CoffeeScript files before running tests.
Install from npm:
npm install buster-coffee
Then add it to your buster.js
config file:
config["My tests"] = {
// ...
extensions: [require("buster-coffee")]
// ...
};
The extension has no configuration options.
See the demo/
dir for an example project using Buster.JS and buster-coffee to
test a function that is implemented in CoffeeScript, using tests written in
CoffeeScript.
If you are using buster-amd, you don't need buster-coffee to compile
your CoffeeScript files, but can instead use e.g. the require-cs AMD loader
plugin. See the demo-amd/
dir for an extensive example project, using
Buster.JS to test AMD modules written in CoffeeScript and loaded with
RequireJS.
Currently, buster-coffee does not work with files that are to be included using
require()
. buster-coffee never writes any files to disk, while require()
explictly looks for the files it will include on disk. Because of this,
buster-coffee has limited use for Node.js development in CoffeeScript.
- Add license declaration to package.json.
- Update links after repo move.
- Set the ETag on the generated JavaScript resource to the same as the original CoffeeScript resource. This ensures that any generated JavaScript cached by Buster.JS will be invalidated when the CoffeeScript source changes.
- Leave
.coffee
files untouched if theenvironment
setting is set tonode
. Contributed by Stephen Moore.
- Remove unused dependency on
when
.
- Use the coffee-script module's API instead of executing the
coffee
command.
- Initial release.
Copyright 2012, Stein Magnus Jodal.
Released under the Simplified BSD license. See the LICENSE
file for details.