@@ -44,55 +44,75 @@ export namespace assert {
4444 */
4545 function rejects ( fn : ( ) => Promise < unknown > , error : RegExp , message ?: string , ...args : any [ ] ) : Promise < void > ;
4646}
47- export function load ( href : string ) : void ;
48- export function suite ( text : string , callback : ( ) => void ) : void ;
47+ /**
48+ * Load a new frame.
49+ * @example
50+ * load('./test-sibling.html');
51+ * @param {string } href - The URL/path to the test file to run
52+ * @returns {void }
53+ */
54+ export function load ( href : string , ...args : any [ ] ) : void ;
55+ /**
56+ * Register a grouping of tests. Alternatively, mark with flags (.skip, .only, .todo).
57+ * @param {string } name - The description of the test group
58+ * @param {() => void } fn - The callback function containing nested tests
59+ * @returns {void }
60+ */
61+ export function suite ( name : string , fn : ( ) => void , ...args : any [ ] ) : void ;
4962export namespace suite {
5063 /**
5164 * Register a test group that will be skipped during execution.
52- * @param {string } text - The description of the test group
53- * @param {() => void } callback - The callback function containing nested tests
65+ * @param {string } name - The description of the test group
66+ * @param {() => void } fn - The callback function containing nested tests
5467 * @returns {void }
5568 */
56- function skip ( text : string , callback : ( ) => void ) : void ;
69+ function skip ( name : string , fn : ( ) => void , ... args : any [ ] ) : void ;
5770 /**
5871 * Register a test group that will run exclusively (skips other non-only tests).
59- * @param {string } text - The description of the test group
60- * @param {() => void } callback - The callback function containing nested tests
72+ * @param {string } name - The description of the test group
73+ * @param {() => void } fn - The callback function containing nested tests
6174 * @returns {void }
6275 */
63- function only ( text : string , callback : ( ) => void ) : void ;
76+ function only ( name : string , fn : ( ) => void , ... args : any [ ] ) : void ;
6477 /**
6578 * Register a placeholder test group for future implementation.
66- * @param {string } text - The description of the test group
67- * @param {() => void } callback - The callback function containing nested tests
79+ * @param {string } name - The description of the test group
80+ * @param {() => void } fn - The callback function containing nested tests
6881 * @returns {void }
6982 */
70- function todo ( text : string , callback : ( ) => void ) : void ;
83+ function todo ( name : string , fn : ( ) => void , ... args : any [ ] ) : void ;
7184}
72- export function test ( text : string , callback : ( ) => void | Promise < void > , interval ?: number ) : void ;
85+ /**
86+ * Register an individual test case. Alternatively, mark with flags (.skip, .only, .todo).
87+ * @param {string } name - The description of the test case
88+ * @param {() => void | Promise<void> } fn - The test callback function
89+ * @param {number } [timeout] - Optional timeout in milliseconds
90+ * @returns {void }
91+ */
92+ export function test ( name : string , fn : ( ) => void | Promise < void > , timeout ?: number , ...args : any [ ] ) : void ;
7393export namespace test {
7494 /**
7595 * Register a test case that will be skipped during execution.
76- * @param {string } text - The description of the test case
77- * @param {() => void | Promise<void> } callback - The test callback function
78- * @param {number } [interval ] - Optional timeout in milliseconds
96+ * @param {string } name - The description of the test case
97+ * @param {() => void | Promise<void> } fn - The test callback function
98+ * @param {number } [timeout ] - Optional timeout in milliseconds
7999 * @returns {void }
80100 */
81- function skip ( text : string , callback : ( ) => void | Promise < void > , interval ?: number ) : void ;
101+ function skip ( name : string , fn : ( ) => void | Promise < void > , timeout ?: number , ... args : any [ ] ) : void ;
82102 /**
83103 * Register a test case that will run exclusively (skips other non-only tests).
84- * @param {string } text - The description of the test case
85- * @param {() => void | Promise<void> } callback - The test callback function
86- * @param {number } [interval ] - Optional timeout in milliseconds
104+ * @param {string } name - The description of the test case
105+ * @param {() => void | Promise<void> } fn - The test callback function
106+ * @param {number } [timeout ] - Optional timeout in milliseconds
87107 * @returns {void }
88108 */
89- function only ( text : string , callback : ( ) => void | Promise < void > , interval ?: number ) : void ;
109+ function only ( name : string , fn : ( ) => void | Promise < void > , timeout ?: number , ... args : any [ ] ) : void ;
90110 /**
91111 * Register a placeholder test case for future implementation.
92- * @param {string } text - The description of the test case
93- * @param {() => void | Promise<void> } callback - The test callback function
94- * @param {number } [interval ] - Optional timeout in milliseconds
112+ * @param {string } name - The description of the test case
113+ * @param {() => void | Promise<void> } fn - The test callback function
114+ * @param {number } [timeout ] - Optional timeout in milliseconds
95115 * @returns {void }
96116 */
97- function todo ( text : string , callback : ( ) => void | Promise < void > , interval ?: number ) : void ;
117+ function todo ( name : string , fn : ( ) => void | Promise < void > , timeout ?: number , ... args : any [ ] ) : void ;
98118}
0 commit comments