Is it possible to have teardown methods that run after every test in qUnit? If not, are开发者_如何转开发 there any plugins around that will do this?
You can pass it in the module function like this:
module( "name", {teardown: function() {...}});
You want to register a function with QUnit.testDone(func).
I have an example here:
How do I run a function before each test when using qUnit?
精彩评论