Skip to content

Commit 269b935

Browse files
committed
fix(supabase): wrong test
1 parent 5c8e858 commit 269b935

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

nx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
},
119119
"test:unit": {
120120
"inputs": ["testing", "^production"],
121+
"dependsOn": ["build"],
121122
"cache": true,
122123
"outputs": ["{projectRoot}/coverage"]
123124
},

packages/core/functions-js/test/relay/container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export async function runRelay(
101101
log(`check function is healthy: ${slug + '-' + id}`)
102102
for (let ctr = 0; ctr < 60; ctr++) {
103103
try {
104-
const healthCheck = await nodeFetch(
104+
const healthCheck = await fetch(
105105
`http://localhost:${startedRelay.getMappedPort(8081)}/${slug}`,
106106
{
107107
method: 'POST',

packages/core/postgrest-js/test/basic.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ test('handles undefined global fetch', async () => {
21372137
"statusText": "OK",
21382138
}
21392139
`)
2140-
// Test passes if we reach here without errors, as it means nodeFetch was used
2140+
// Test passes if we reach here without errors, as it means native fetch was used
21412141
} finally {
21422142
// Restore original fetch
21432143
globalThis.fetch = originalFetch

packages/core/supabase-js/test/unit/fetch.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,13 @@ describe('fetch module', () => {
4040
})
4141

4242
describe('resolveHeadersConstructor', () => {
43-
test('should use global Headers when available', () => {
43+
test('should return native Headers', () => {
4444
const GlobalHeaders = jest.fn()
4545
;(global as any).Headers = GlobalHeaders
4646

4747
const result = resolveHeadersConstructor()
4848
expect(result).toBe(GlobalHeaders)
4949
})
50-
51-
test('should fallback to NodeFetchHeaders when global Headers is undefined', () => {
52-
const result = resolveHeadersConstructor()
53-
expect(typeof result).toBe('function')
54-
})
5550
})
5651

5752
describe('fetchWithAuth', () => {

0 commit comments

Comments
 (0)