(name, options, executeNow)
| 1285 | }; |
| 1286 | } |
| 1287 | function processModule(name, options, executeNow) { |
| 1288 | var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; |
| 1289 | if (typeof options === 'function') { |
| 1290 | executeNow = options; |
| 1291 | options = undefined; |
| 1292 | } |
| 1293 | var module = createModule(name, options, modifiers); |
| 1294 | |
| 1295 | // Transfer any initial hooks from the options object to the 'hooks' object |
| 1296 | var testEnvironment = module.testEnvironment; |
| 1297 | var hooks = module.hooks; |
| 1298 | setHookFromEnvironment(hooks, testEnvironment, 'before'); |
| 1299 | setHookFromEnvironment(hooks, testEnvironment, 'beforeEach'); |
| 1300 | setHookFromEnvironment(hooks, testEnvironment, 'afterEach'); |
| 1301 | setHookFromEnvironment(hooks, testEnvironment, 'after'); |
| 1302 | var moduleFns = { |
| 1303 | before: makeSetHook(module, 'before'), |
| 1304 | beforeEach: makeSetHook(module, 'beforeEach'), |
| 1305 | afterEach: makeSetHook(module, 'afterEach'), |
| 1306 | after: makeSetHook(module, 'after') |
| 1307 | }; |
| 1308 | var prevModule = config.currentModule; |
| 1309 | config.currentModule = module; |
| 1310 | if (typeof executeNow === 'function') { |
| 1311 | moduleStack.push(module); |
| 1312 | try { |
| 1313 | var cbReturnValue = executeNow.call(module.testEnvironment, moduleFns); |
| 1314 | if (cbReturnValue && typeof cbReturnValue.then === 'function') { |
| 1315 | Logger.warn('Returning a promise from a module callback is not supported. ' + 'Instead, use hooks for async behavior. ' + 'This will become an error in QUnit 3.0.'); |
| 1316 | } |
| 1317 | } finally { |
| 1318 | // If the module closure threw an uncaught error during the load phase, |
| 1319 | // we let this bubble up to global error handlers. But, not until after |
| 1320 | // we teardown internal state to ensure correct module nesting. |
| 1321 | // Ref https://github.com/qunitjs/qunit/issues/1478. |
| 1322 | moduleStack.pop(); |
| 1323 | config.currentModule = module.parentModule || prevModule; |
| 1324 | } |
| 1325 | } |
| 1326 | } |
| 1327 | var focused$1 = false; // indicates that the "only" filter was used |
| 1328 | |
| 1329 | function module$1(name, options, executeNow) { |
no test coverage detected
searching dependent graphs…