Closed mroderick closed 10 years ago
I had this error too, but found the following in the release notes:
assert, refute and other globals or gone. Buster only exposes the buster global now.
It then goes on explaining how to specify helpers to get expect
back as an available global helper.
However I found that your helper file should most likely look like this for that workaround to work (for node testing):
var buster = require('buster');
assert = buster.assert;
refute = buster.refute;
expect = buster.expect;
It isn't intended to expose the expect function, only the functions describe
, it
, itEventually
, before
, beforeAll
, beforeEach
, after
, afterAll
and afterEach
. You have to make the function available via var expect = buster.expect;
.
In 0.7.x, expect is not defined as a global, even after
buster.spec.expose()
See https://github.com/mroderick/buster-spec-bug for details