HomePhabricator

qunit: Remove redundant conditional for sandbox teardown

Authored by Krinkle on Jul 8 2017, 12:35 AM.

Description

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