javascript - beforeEach with suite syntax for mocha tests -
i'm coming rspec style before(:each)
blocks , working on javascript project uses mocha's suite
instead of describe
. seems mocha has beforeeach
need, doesn't work because we're using suite
instead of describe
. team doesn't want change syntax. how run code before each test?
you should able use setup
, teardown
, suitesetup
, , suiteteardown
.
reference: https://github.com/mochajs/mocha/issues/310
Comments
Post a Comment