Closed olance closed 10 years ago
:+1:
I use following script which support brower & node.js.
(function (global) {
if (typeof require == "function" && typeof module == "object") {
global.buster = require("buster");
}
global.assert = buster.assert;
global.refute = buster.refute;
global.expect = buster.expect;
})(this.self || global);
That looks nicer! :)
The example in the release notes is for browser testing. The example is just intended to show how assert
, refute
and expect
are exposed. If you need a test helper for node or hybrid testing, you are free to create your own.
The v0.7.4 release notes indicate that:
It then goes on explaining how to specify helpers to get
expect
and other globals back as an available global helper.However I found that the helper file should most likely look like this for that workaround to work (for node testing):
Maybe the change log needs to be updated?