qUnit Teardown method
Asked Answered
N

2

9

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?

Naseberry answered 8/1, 2010 at 14:53 Comment(0)
B
19

You can pass it in the module function like this:

module( "name", {teardown: function() {...}});
Brenda answered 8/1, 2010 at 17:19 Comment(0)
M
1

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?

Mullock answered 23/7, 2012 at 23:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.