@@ -3,13 +3,13 @@ import type {App} from '../app.js';
33import type {
44 JSONValue ,
55 ServerOptions ,
6+ TestContext ,
67 TestUserAgentOptions ,
78 UserAgentRequestOptions ,
89 UserAgentWebSocketOptions
910} from '../types.js' ;
1011import type { WebSocket } from '../websocket.js' ;
1112import type { URL } from 'node:url' ;
12- import type { Test } from 'tap' ;
1313import assert from 'node:assert/strict' ;
1414import { on } from 'node:events' ;
1515import { MockUserAgent } from './mock.js' ;
@@ -23,7 +23,7 @@ type SkipFunction = (...args: any[]) => any;
2323// Helper function to add required `TestUserAgent` assert methods
2424// that are missing in a `TAP` instance. This is as an intended side effect
2525// to ensure compatibility with `TestUserAgent` class below
26- function addNodeAssertMethods ( tapInstance : Test ) : void {
26+ function addNodeAssertMethods ( tapInstance : TestContext ) : void {
2727 ( tapInstance as any ) . strictEqual = tapInstance . equal . bind ( tapInstance ) ;
2828 ( tapInstance as any ) . notStrictEqual = tapInstance . not . bind ( tapInstance ) ;
2929 ( tapInstance as any ) . doesNotMatch = tapInstance . notMatch . bind ( tapInstance ) ;
@@ -39,7 +39,7 @@ export class TestUserAgent extends MockUserAgent {
3939 */
4040 body : Buffer = Buffer . from ( '' ) ;
4141
42- _assert : typeof assert | Test | undefined = undefined ;
42+ _assert : typeof assert | TestContext | undefined = undefined ;
4343 _dom : DOM | undefined = undefined ;
4444 _finished : [ number , string ] | null | undefined = undefined ;
4545 _messages : AsyncIterableIterator < JSONValue > | undefined = undefined ;
@@ -372,13 +372,13 @@ export class TestUserAgent extends MockUserAgent {
372372 return this . _dom ;
373373 }
374374
375- _prepareTap ( tap : Test ) : void {
375+ _prepareTap ( tap : TestContext ) : void {
376376 addNodeAssertMethods ( tap ) ;
377377 this . _assert = tap ;
378378 const subtests = [ tap ] ;
379379 const assert = this . _assert ;
380380
381- assert . beforeEach ( async t => {
381+ assert . beforeEach ( async ( t : TestContext ) => {
382382 addNodeAssertMethods ( t ) ;
383383 subtests . push ( t ) ;
384384 this . _assert = t ;
0 commit comments