@@ -112,14 +112,9 @@ export function setupTest(
112
112
* Once invoked, all subsequent hooks.beforeEach and test invocations will
113
113
* have access to the following:
114
114
* * All of the methods / properties listed for `setupTest`
115
- * * this.render(...) - Renders the provided template snippet returning a
116
- * promise that resolves once rendering has completed
117
- * * An importable render function that de-sugars into this.render will be
118
- * the default output of blueprints
115
+ * * An importable render function
119
116
* * this.element - Returns the native DOM element representing the element
120
117
* that was rendered via this.render
121
- * * this.$(...) - When jQuery is present, executes a jQuery selector with
122
- * the current this.element as its root
123
118
*/
124
119
export function setupRenderingTest (
125
120
hooks : NestedHooks ,
@@ -364,30 +359,38 @@ declare global {
364
359
* module's queue has emptied, it will not run this hook again.
365
360
*/
366
361
after < TC extends TestContext > (
367
- fn : ( this : TC , assert : Assert ) => void | Promise < void >
362
+ fn :
363
+ | ( ( this : TC , assert : Assert ) => void )
364
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
368
365
) : void ;
369
366
370
367
/**
371
368
* Runs after each test.
372
369
*/
373
370
afterEach < TC extends TestContext > (
374
- fn : ( this : TC , assert : Assert ) => void | Promise < void >
371
+ fn :
372
+ | ( ( this : TC , assert : Assert ) => void )
373
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
375
374
) : void ;
376
375
377
376
/**
378
377
* Runs before the first test.
379
378
*/
380
379
// SAFETY: this is just wildly, impossibly unsafe. QUnit cannot -- ever! --
381
380
before < TC extends TestContext > (
382
- fn : ( this : TC , assert : Assert ) => void | Promise < void >
381
+ fn :
382
+ | ( ( this : TC , assert : Assert ) => void )
383
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
383
384
) : void ;
384
385
385
386
/**
386
387
* Runs before each test.
387
388
*/
388
389
// SAFETY: this is just wildly, impossibly unsafe. QUnit cannot -- ever! --
389
390
beforeEach < TC extends TestContext > (
390
- fn : ( this : TC , assert : Assert ) => void | Promise < void >
391
+ fn :
392
+ | ( ( this : TC , assert : Assert ) => void )
393
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
391
394
) : void ;
392
395
}
393
396
@@ -413,7 +416,9 @@ declare global {
413
416
// `<template>` and local scope.
414
417
test < TC extends TestContext > (
415
418
name : string ,
416
- callback : ( this : TC , assert : Assert ) => void | Promise < unknown >
419
+ callback :
420
+ | ( ( this : TC , assert : Assert ) => void )
421
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
417
422
) : void ;
418
423
419
424
/**
@@ -438,7 +443,9 @@ declare global {
438
443
// `<template>` and local scope.
439
444
only < TC extends TestContext > (
440
445
name : string ,
441
- callback : ( this : TC , assert : Assert ) => void | Promise < unknown >
446
+ callback :
447
+ | ( ( this : TC , assert : Assert ) => void )
448
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
442
449
) : void ;
443
450
444
451
/**
@@ -457,7 +464,9 @@ declare global {
457
464
// `<template>` and local scope.
458
465
todo < TC extends TestContext > (
459
466
name : string ,
460
- callback : ( this : TC , assert : Assert ) => void | Promise < unknown >
467
+ callback :
468
+ | ( ( this : TC , assert : Assert ) => void )
469
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
461
470
) : void ;
462
471
463
472
/**
@@ -479,7 +488,9 @@ declare global {
479
488
// `<template>` and local scope.
480
489
skip < TC extends TestContext > (
481
490
name : string ,
482
- callback ?: ( this : TC , assert : Assert ) => void | Promise < unknown >
491
+ callback ?:
492
+ | ( ( this : TC , assert : Assert ) => void )
493
+ | ( ( this : TC , assert : Assert ) => Promise < void > )
483
494
) : void ;
484
495
}
485
496
}
0 commit comments