开发者

qUnit Teardown method

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜