Skip to content

Commit cbbcc73

Browse files
committed
Fix CI
1 parent dad6a91 commit cbbcc73

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ test('should wrap got cause', async t => {
386386

387387
test('should wrap non-got cause', async t => {
388388
class SocksProxyAgent extends Agent {
389-
createConnection() {
389+
override createConnection(..._args: Parameters<InstanceType<typeof Agent>['createConnection']>): ReturnType<InstanceType<typeof Agent>['createConnection']> {
390390
throw new SocksClientError('oh no');
391391
}
392392
}

test/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,10 +1333,10 @@ test('can retry without an agent', withServer, async (t, server, got) => {
13331333
let counter = 0;
13341334

13351335
class MyAgent extends HttpAgent {
1336-
createConnection(port: any, options: any, callback: any) {
1336+
override createConnection(...args: Parameters<InstanceType<typeof HttpAgent>['createConnection']>): ReturnType<InstanceType<typeof HttpAgent>['createConnection']> {
13371337
counter++;
13381338

1339-
return (HttpAgent as any).prototype.createConnection.call(this, port, options, callback);
1339+
return (HttpAgent as any).prototype.createConnection.apply(this, args as any);
13401340
}
13411341
}
13421342

0 commit comments

Comments
 (0)