Ticket #5620 (closed enhancement: invalid)
beforeModule function for QUnit
| Reported by: | eeroan | Owned by: | joern |
|---|---|---|---|
| Priority: | trivial | Milestone: | 1.4 |
| Component: | qunit | Version: | 1.4a1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
It would be nice to say like this:
module('with empty form', { beforeModule: clearForm });
But there is no way to tell what to do before certain module.
in qunit.js on line 56 (declaration of module function) this could be added:
if(testEnvironment && testEnvironment.beforeModule) {
testEnvironment.beforeModule(name);
}
Change History
comment:2 Changed 3 years ago by eeroan
setup is called before every test. There are things that are required to do only once before a certain module.
comment:3 Changed 3 years ago by john
- Status changed from new to closed
- Resolution set to invalid
We're moving QUnit-related bugs off to the new QUnit issue tracker: http://github.com/jquery/qunit/issues
Please re-post the issue there.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I might not be understanding the full intent, but isn't that what setup is for?