Skip to content

Commit 964ea6b

Browse files
committed
test: skip og image integration test in windows
1 parent 4dae38d commit 964ea6b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests/integration/wasm.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getLogger } from 'lambda-local'
2+
import { platform } from 'node:process'
23
import { v4 } from 'uuid'
34
import { beforeEach, describe, expect, test, vi } from 'vitest'
45
import { type FixtureTestContext } from '../utils/contexts.js'
@@ -52,11 +53,16 @@ describe.each([
5253
expect(og.headers['content-type']).toBe('image/png')
5354
})
5455

55-
test<FixtureTestContext>('should work in app route with node runtime', async (ctx) => {
56-
const ogNode = await invokeFunction(ctx, { url: '/og-node' })
57-
expect(ogNode.statusCode).toBe(200)
58-
expect(ogNode.headers['content-type']).toBe('image/png')
59-
})
56+
// on Node 18.20.6 on Windows, there seems to be an issue with OG image generation in this scenario
57+
// that is reproducible with `next start` even outside of Netlify context
58+
test.skipIf(platform === 'win32')<FixtureTestContext>(
59+
'should work in app route with node runtime',
60+
async (ctx) => {
61+
const ogNode = await invokeFunction(ctx, { url: '/og-node' })
62+
expect(ogNode.statusCode).toBe(200)
63+
expect(ogNode.headers['content-type']).toBe('image/png')
64+
},
65+
)
6066

6167
test<FixtureTestContext>('should work in middleware', async (ctx) => {
6268
const origin = new LocalServer()

0 commit comments

Comments
 (0)