qunit: Remove redundant conditional for sandbox teardown
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 8 Jul 2017 00:35:26 +0000 (17:35 -0700)
committerKrinkle <krinklemail@gmail.com>
Mon, 17 Jul 2017 20:25:11 +0000 (20:25 +0000)
commit5a49381406d6938637289beabe4ff35d15db06c5
treec21dd61595981bf0971c3080978801d87fd9f343
parent8338cc0917c9b2631636187b36b440e2510c78db
qunit: Remove redundant conditional for sandbox teardown

Follows-up 0a208911a257, which added support for the `executeNow`
parameter to QUnit.module.

To properly support nested modules, we also need to skip registering
a second setup and teardown because nested modules already run the
beforeEach (setup), and afterEach (teardown), of their parent modules.

During setup this would needlessly create two sandboxes and override
the 'sandbox' property on the same 'this' context object. During
teardown it would fail because the inner module's teardown would
have already torn down the sandbox.

Change-Id: Ib17bbbef45b2bd0247979cf0fa8aed17800c54a0
tests/qunit/data/testrunner.js