@@ -409,24 +409,11 @@ export interface TryFn<Context = unknown> {
409409 */
410410 < Args extends any [ ] > ( title : string , fn : EitherMacro < Args , Context > , ...args : Args ) : Promise < TryResult > ;
411411
412- /**
413- * Attempt to run some assertions. The result must be explicitly committed or discarded or else
414- * the test will fail. A macro may be provided. The title may help distinguish attempts from
415- * one another.
416- */
417- < Args extends any [ ] > ( title : string , fn : [ EitherMacro < Args , Context > , ...Array < EitherMacro < Args , Context > > ] , ...args : Args ) : Promise < TryResult [ ] > ;
418-
419412 /**
420413 * Attempt to run some assertions. The result must be explicitly committed or discarded or else
421414 * the test will fail. A macro may be provided.
422415 */
423416 < Args extends any [ ] > ( fn : EitherMacro < Args , Context > , ...args : Args ) : Promise < TryResult > ;
424-
425- /**
426- * Attempt to run some assertions. The result must be explicitly committed or discarded or else
427- * the test will fail. A macro may be provided.
428- */
429- < Args extends any [ ] > ( fn : [ EitherMacro < Args , Context > , ...Array < EitherMacro < Args , Context > > ] , ...args : Args ) : Promise < TryResult [ ] > ;
430417}
431418
432419export interface AssertionError extends Error { }
@@ -483,18 +470,15 @@ export type Macro<Args extends any[], Context = unknown> = UntitledMacro<Args, C
483470
484471export type EitherMacro < Args extends any [ ] , Context > = Macro < Args , Context > | UntitledMacro < Args , Context > ;
485472
486- /** Alias for a single macro, or an array of macros. */
487- export type OneOrMoreMacros < Args extends any [ ] , Context > = EitherMacro < Args , Context > | [ EitherMacro < Args , Context > , ...Array < EitherMacro < Args , Context > > ] ;
488-
489473export interface TestInterface < Context = unknown > {
490474 /** Declare a concurrent test. */
491475 ( title : string , implementation : Implementation < Context > ) : void ;
492476
493- /** Declare a concurrent test that uses one or more macros . Additional arguments are passed to the macro. */
494- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
477+ /** Declare a concurrent test that uses a macro . Additional arguments are passed to the macro. */
478+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
495479
496- /** Declare a concurrent test that uses one or more macros . The macro is responsible for generating a unique test title. */
497- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
480+ /** Declare a concurrent test that uses a macro . The macro is responsible for generating a unique test title. */
481+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
498482
499483 /** Declare a hook that is run once, after all tests have passed. */
500484 after : AfterInterface < Context > ;
@@ -528,10 +512,10 @@ export interface AfterInterface<Context = unknown> {
528512 ( title : string , implementation : Implementation < Context > ) : void ;
529513
530514 /** Declare a hook that is run once, after all tests have passed. Additional arguments are passed to the macro. */
531- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
515+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
532516
533517 /** Declare a hook that is run once, after all tests have passed. */
534- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
518+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
535519
536520 /** Declare a hook that is run once, after all tests are done. */
537521 always : AlwaysInterface < Context > ;
@@ -547,10 +531,10 @@ export interface AlwaysInterface<Context = unknown> {
547531 ( title : string , implementation : Implementation < Context > ) : void ;
548532
549533 /** Declare a hook that is run once, after all tests are done. Additional arguments are passed to the macro. */
550- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
534+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
551535
552536 /** Declare a hook that is run once, after all tests are done. */
553- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
537+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
554538
555539 skip : HookSkipInterface < Context > ;
556540}
@@ -563,10 +547,10 @@ export interface BeforeInterface<Context = unknown> {
563547 ( title : string , implementation : Implementation < Context > ) : void ;
564548
565549 /** Declare a hook that is run once, before all tests. Additional arguments are passed to the macro. */
566- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
550+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
567551
568552 /** Declare a hook that is run once, before all tests. */
569- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
553+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
570554
571555 skip : HookSkipInterface < Context > ;
572556}
@@ -576,16 +560,16 @@ export interface FailingInterface<Context = unknown> {
576560 ( title : string , implementation : Implementation < Context > ) : void ;
577561
578562 /**
579- * Declare a concurrent test that uses one or more macros . Additional arguments are passed to the macro.
563+ * Declare a concurrent test that uses a macro . Additional arguments are passed to the macro.
580564 * The test is expected to fail.
581565 */
582- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
566+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
583567
584568 /**
585- * Declare a concurrent test that uses one or more macros . The macro is responsible for generating a unique test title.
569+ * Declare a concurrent test that uses a macro . The macro is responsible for generating a unique test title.
586570 * The test is expected to fail.
587571 */
588- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
572+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
589573
590574 only : OnlyInterface < Context > ;
591575 skip : SkipInterface < Context > ;
@@ -599,40 +583,40 @@ export interface HookSkipInterface<Context = unknown> {
599583 ( title : string , implementation : Implementation < Context > ) : void ;
600584
601585 /** Skip this hook. */
602- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
586+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
603587
604588 /** Skip this hook. */
605- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
589+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
606590}
607591
608592export interface OnlyInterface < Context = unknown > {
609593 /** Declare a test. Only this test and others declared with `.only()` are run. */
610594 ( title : string , implementation : Implementation < Context > ) : void ;
611595
612596 /**
613- * Declare a test that uses one or more macros . Additional arguments are passed to the macro.
597+ * Declare a test that uses a macro . Additional arguments are passed to the macro.
614598 * Only this test and others declared with `.only()` are run.
615599 */
616- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
600+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
617601
618602 /**
619- * Declare a test that uses one or more macros . The macro is responsible for generating a unique test title.
603+ * Declare a test that uses a macro . The macro is responsible for generating a unique test title.
620604 * Only this test and others declared with `.only()` are run.
621605 */
622- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
606+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
623607}
624608
625609export interface SerialInterface < Context = unknown > {
626610 /** Declare a serial test. */
627611 ( title : string , implementation : Implementation < Context > ) : void ;
628612
629- /** Declare a serial test that uses one or more macros . Additional arguments are passed to the macro. */
630- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
613+ /** Declare a serial test that uses a macro . Additional arguments are passed to the macro. */
614+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
631615
632616 /**
633- * Declare a serial test that uses one or more macros . The macro is responsible for generating a unique test title.
617+ * Declare a serial test that uses a macro . The macro is responsible for generating a unique test title.
634618 */
635- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
619+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
636620
637621 /** Declare a serial hook that is run once, after all tests have passed. */
638622 after : AfterInterface < Context > ;
@@ -659,10 +643,10 @@ export interface SkipInterface<Context = unknown> {
659643 ( title : string , implementation : Implementation < Context > ) : void ;
660644
661645 /** Skip this test. */
662- < T extends any [ ] > ( title : string , macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
646+ < T extends any [ ] > ( title : string , macro : EitherMacro < T , Context > , ...rest : T ) : void ;
663647
664648 /** Skip this test. */
665- < T extends any [ ] > ( macros : OneOrMoreMacros < T , Context > , ...rest : T ) : void ;
649+ < T extends any [ ] > ( macro : EitherMacro < T , Context > , ...rest : T ) : void ;
666650}
667651
668652export interface TodoDeclaration {
0 commit comments