Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 14022b4

Browse files
committed
chore: fix failing tests
1 parent 2a3063e commit 14022b4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/relay/container.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as fs from 'fs'
22
import { nanoid } from 'nanoid'
3-
import crossFetch from 'cross-fetch'
3+
// @ts-ignore
4+
import nodeFetch from '@supabase/node-fetch'
45
import { sign } from 'jsonwebtoken'
56
import { GenericContainer, Network, StartedTestContainer, Wait } from 'testcontainers'
67
import { ExecResult } from 'testcontainers/dist/docker/types'
@@ -87,7 +88,7 @@ export async function runRelay(
8788
log(`check function is healthy: ${slug + '-' + id}`)
8889
for (let ctr = 0; ctr < 30; ctr++) {
8990
try {
90-
const healthCheck = await crossFetch(
91+
const healthCheck = await nodeFetch(
9192
`http://localhost:${startedRelay.getMappedPort(8081)}/${slug}`,
9293
{
9394
method: 'POST',

test/utils/fetch.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import crossFetch from 'cross-fetch'
1+
// @ts-ignore
2+
import nodeFetch from '@supabase/node-fetch'
23

34
/**
45
* It returns a crossFetch function that uses overridden input: RequestInfo and init?: RequestInit for
@@ -11,5 +12,5 @@ export function getCustomFetch(
1112
reqInfo: RequestInfo | URL,
1213
reqInit?: RequestInit | undefined
1314
): (input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response> {
14-
return (input, init) => crossFetch(reqInfo, reqInit)
15+
return (input, init) => nodeFetch(reqInfo, reqInit)
1516
}

0 commit comments

Comments
 (0)