Skip to content

Commit d6ead88

Browse files
biilmannclaude
andcommitted
fix: resolve merge conflict in edge-functions test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8be5bfa commit d6ead88

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

tests/integration/commands/logs/edge-functions.test.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,7 @@ describe('logs:edge-functions command', () => {
198198

199199
const originalFetch = global.fetch
200200
const spyFetch = vi.fn().mockImplementation((url: string) => {
201-
const hostname = new URL(url).hostname
202-
if (hostname === 'analytics.services.netlify.com') {
203-
if (parsedUrl.hostname === 'analytics.services.netlify.com') {
201+
if (url.includes('analytics.services.netlify.com')) {
204202
return Promise.resolve({
205203
ok: true,
206204
json: () => Promise.resolve(mockLogs),
@@ -214,12 +212,9 @@ describe('logs:edge-functions command', () => {
214212
await program.parseAsync(['', '', 'logs:edge-functions', '--from', '2026-01-01T00:00:00Z'])
215213

216214
expect(spyWebsocket).not.toHaveBeenCalled()
217-
const analyticsCall = spyFetch.mock.calls.find((args: string[]) => {
218-
const hostname = new URL(args[0]).hostname
219-
return hostname === 'analytics.services.netlify.com'
220-
})
221-
return parsedUrl.hostname === 'analytics.services.netlify.com'
222-
})
215+
const analyticsCall = spyFetch.mock.calls.find((args: string[]) =>
216+
args[0].includes('analytics.services.netlify.com'),
217+
)
223218
expect(analyticsCall).toBeDefined()
224219
expect(analyticsCall![0]).toContain('edge_function_logs')
225220
expect(analyticsCall![0]).toContain('site_id')

0 commit comments

Comments
 (0)