QUnit Async Tests with setup And teardown

本秂侑毒 提交于 2019-12-01 09:11:54
P.Scheit

It was a documented issue:

http://api.qunitjs.com/QUnit.config/

its is recommended to set QUnit.config.autostart to false, when loading tests asynchronously. This is my case because "use" is doing it asynchronously.

The head looks like this:

QUnit.config.autostart = false;
use(['Psc.Exception','Psc.Code'], function () {

  QUnit.start();
  module("async", {

So its basically like doing stop() and start() but for loading the tests itself. I tested it and the teardown / setup / test now get correctly executed in the right order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!