@@ -353,7 +353,7 @@ export interface TruthyAssertion {
353
353
}
354
354
355
355
/** The `t` value passed to test & hook implementations. */
356
- export interface ExecutionContext < Context = { } > extends Assertions {
356
+ export interface ExecutionContext < Context = unknown > extends Assertions {
357
357
/** Test context, shared with hooks. */
358
358
context : Context ;
359
359
@@ -393,7 +393,7 @@ export interface TimeoutFn {
393
393
}
394
394
395
395
/** The `t` value passed to implementations for tests & hooks declared with the `.cb` modifier. */
396
- export interface CbExecutionContext < Context = { } > extends ExecutionContext < Context > {
396
+ export interface CbExecutionContext < Context = unknown > extends ExecutionContext < Context > {
397
397
/**
398
398
* End the test. If `error` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) the test or hook
399
399
* will fail.
@@ -402,14 +402,14 @@ export interface CbExecutionContext<Context = {}> extends ExecutionContext<Conte
402
402
}
403
403
404
404
export type ImplementationResult = PromiseLike < void > | ObservableLike | void ;
405
- export type Implementation < Context = { } > = ( t : ExecutionContext < Context > ) => ImplementationResult ;
406
- export type CbImplementation < Context = { } > = ( t : CbExecutionContext < Context > ) => ImplementationResult ;
405
+ export type Implementation < Context = unknown > = ( t : ExecutionContext < Context > ) => ImplementationResult ;
406
+ export type CbImplementation < Context = unknown > = ( t : CbExecutionContext < Context > ) => ImplementationResult ;
407
407
408
408
/** A reusable test or hook implementation. */
409
- export type UntitledMacro < Args extends any [ ] , Context = { } > = ( t : ExecutionContext < Context > , ...args : Args ) => ImplementationResult ;
409
+ export type UntitledMacro < Args extends any [ ] , Context = unknown > = ( t : ExecutionContext < Context > , ...args : Args ) => ImplementationResult ;
410
410
411
411
/** A reusable test or hook implementation. */
412
- export type Macro < Args extends any [ ] , Context = { } > = UntitledMacro < Args , Context > & {
412
+ export type Macro < Args extends any [ ] , Context = unknown > = UntitledMacro < Args , Context > & {
413
413
/**
414
414
* Implement this function to generate a test (or hook) title whenever this macro is used. `providedTitle` contains
415
415
* the title provided when the test or hook was declared. Also receives the remaining test arguments.
@@ -423,10 +423,10 @@ export type EitherMacro<Args extends any[], Context> = Macro<Args, Context> | Un
423
423
export type OneOrMoreMacros < Args extends any [ ] , Context > = EitherMacro < Args , Context > | [ EitherMacro < Args , Context > , ...EitherMacro < Args , Context > [ ] ] ;
424
424
425
425
/** A reusable test or hook implementation, for tests & hooks declared with the `.cb` modifier. */
426
- export type UntitledCbMacro < Args extends any [ ] , Context = { } > = ( t : CbExecutionContext < Context > , ...args : Args ) => ImplementationResult
426
+ export type UntitledCbMacro < Args extends any [ ] , Context = unknown > = ( t : CbExecutionContext < Context > , ...args : Args ) => ImplementationResult
427
427
428
428
/** A reusable test or hook implementation, for tests & hooks declared with the `.cb` modifier. */
429
- export type CbMacro < Args extends any [ ] , Context = { } > = UntitledCbMacro < Args , Context > & {
429
+ export type CbMacro < Args extends any [ ] , Context = unknown > = UntitledCbMacro < Args , Context > & {
430
430
title ?: ( providedTitle : string | undefined , ...args : Args ) => string ;
431
431
}
432
432
@@ -435,7 +435,7 @@ export type EitherCbMacro<Args extends any[], Context> = CbMacro<Args, Context>
435
435
/** Alias for a single macro, or an array of macros, used for tests & hooks declared with the `.cb` modifier. */
436
436
export type OneOrMoreCbMacros < Args extends any [ ] , Context > = EitherCbMacro < Args , Context > | [ EitherCbMacro < Args , Context > , ...EitherCbMacro < Args , Context > [ ] ] ;
437
437
438
- export interface TestInterface < Context = { } > {
438
+ export interface TestInterface < Context = unknown > {
439
439
/** Declare a concurrent test. */
440
440
( title : string , implementation : Implementation < Context > ) : void ;
441
441
@@ -472,7 +472,7 @@ export interface TestInterface<Context = {}> {
472
472
meta: MetaInterface ;
473
473
}
474
474
475
- export interface AfterInterface < Context = { } > {
475
+ export interface AfterInterface < Context = unknown > {
476
476
/** Declare a hook that is run once, after all tests have passed. */
477
477
( implementation : Implementation < Context > ) : void ;
478
478
@@ -494,7 +494,7 @@ export interface AfterInterface<Context = {}> {
494
494
skip : HookSkipInterface < Context > ;
495
495
}
496
496
497
- export interface AlwaysInterface < Context = { } > {
497
+ export interface AlwaysInterface < Context = unknown > {
498
498
/** Declare a hook that is run once, after all tests are done. */
499
499
( implementation : Implementation < Context > ) : void ;
500
500
@@ -513,7 +513,7 @@ export interface AlwaysInterface<Context = {}> {
513
513
skip : HookSkipInterface < Context > ;
514
514
}
515
515
516
- export interface BeforeInterface < Context = { } > {
516
+ export interface BeforeInterface < Context = unknown > {
517
517
/** Declare a hook that is run once, before all tests. */
518
518
( implementation : Implementation < Context > ) : void ;
519
519
@@ -532,7 +532,7 @@ export interface BeforeInterface<Context = {}> {
532
532
skip : HookSkipInterface < Context > ;
533
533
}
534
534
535
- export interface CbInterface < Context = { } > {
535
+ export interface CbInterface < Context = unknown > {
536
536
/** Declare a test that must call `t.end()` when it's done. */
537
537
( title : string , implementation : CbImplementation < Context > ) : void ;
538
538
@@ -555,7 +555,7 @@ export interface CbInterface<Context = {}> {
555
555
skip : CbSkipInterface < Context > ;
556
556
}
557
557
558
- export interface CbFailingInterface < Context = { } > {
558
+ export interface CbFailingInterface < Context = unknown > {
559
559
/** Declare a test that must call `t.end()` when it's done. The test is expected to fail. */
560
560
( title : string , implementation : CbImplementation < Context > ) : void ;
561
561
@@ -575,7 +575,7 @@ export interface CbFailingInterface<Context = {}> {
575
575
skip : CbSkipInterface < Context > ;
576
576
}
577
577
578
- export interface CbOnlyInterface < Context = { } > {
578
+ export interface CbOnlyInterface < Context = unknown > {
579
579
/**
580
580
* Declare a test that must call `t.end()` when it's done. Only this test and others declared with `.only()` are run.
581
581
*/
@@ -594,7 +594,7 @@ export interface CbOnlyInterface<Context = {}> {
594
594
< T extends any [ ] > ( macros : OneOrMoreCbMacros < T , Context > , ...rest : T ) : void ;
595
595
}
596
596
597
- export interface CbSkipInterface < Context = { } > {
597
+ export interface CbSkipInterface < Context = unknown > {
598
598
/** Skip this test. */
599
599
( title : string , implementation : CbImplementation < Context > ) : void ;
600
600
@@ -605,7 +605,7 @@ export interface CbSkipInterface<Context = {}> {
605
605
< T extends any [ ] > ( macros : OneOrMoreCbMacros < T , Context > , ...rest : T ) : void ;
606
606
}
607
607
608
- export interface FailingInterface < Context = { } > {
608
+ export interface FailingInterface < Context = unknown > {
609
609
/** Declare a concurrent test. The test is expected to fail. */
610
610
( title : string , implementation : Implementation < Context > ) : void ;
611
611
@@ -625,7 +625,7 @@ export interface FailingInterface<Context = {}> {
625
625
skip : SkipInterface < Context > ;
626
626
}
627
627
628
- export interface HookCbInterface < Context = { } > {
628
+ export interface HookCbInterface < Context = unknown > {
629
629
/** Declare a hook that must call `t.end()` when it's done. */
630
630
( implementation : CbImplementation < Context > ) : void ;
631
631
@@ -646,7 +646,7 @@ export interface HookCbInterface<Context = {}> {
646
646
skip : HookCbSkipInterface < Context > ;
647
647
}
648
648
649
- export interface HookCbSkipInterface < Context = { } > {
649
+ export interface HookCbSkipInterface < Context = unknown > {
650
650
/** Skip this hook. */
651
651
( implementation : CbImplementation < Context > ) : void ;
652
652
@@ -660,7 +660,7 @@ export interface HookCbSkipInterface<Context = {}> {
660
660
< T extends any [ ] > ( macros : OneOrMoreCbMacros < T , Context > , ...rest : T ) : void ;
661
661
}
662
662
663
- export interface HookSkipInterface < Context = { } > {
663
+ export interface HookSkipInterface < Context = unknown > {
664
664
/** Skip this hook. */
665
665
( implementation : Implementation < Context > ) : void ;
666
666
@@ -674,7 +674,7 @@ export interface HookSkipInterface<Context = {}> {
674
674
< T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
675
675
}
676
676
677
- export interface OnlyInterface < Context = { } > {
677
+ export interface OnlyInterface < Context = unknown > {
678
678
/** Declare a test. Only this test and others declared with `.only()` are run. */
679
679
( title : string , implementation : Implementation < Context > ) : void ;
680
680
@@ -691,7 +691,7 @@ export interface OnlyInterface<Context = {}> {
691
691
< T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
692
692
}
693
693
694
- export interface SerialInterface < Context = { } > {
694
+ export interface SerialInterface < Context = unknown > {
695
695
/** Declare a serial test. */
696
696
( title : string , implementation : Implementation < Context > ) : void ;
697
697
@@ -726,7 +726,7 @@ export interface SerialInterface<Context = {}> {
726
726
todo : TodoDeclaration ;
727
727
}
728
728
729
- export interface SkipInterface < Context = { } > {
729
+ export interface SkipInterface < Context = unknown > {
730
730
/** Skip this test. */
731
731
( title : string , implementation : Implementation < Context > ) : void ;
732
732
0 commit comments