Skip to content

Commit 332fdf0

Browse files
committed
test: wat2
1 parent 254d7bd commit 332fdf0

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

.github/workflows/run-tests.yml

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ jobs:
8080
run: npm ci
8181
- name: 'Build'
8282
run: npm run build
83+
- name: 'Vendor deno helpers for integration tests'
84+
run: deno vendor eszip.ts
85+
working-directory: tools/deno
8386
- name: Resolve Next.js version
8487
id: resolve-next-version
8588
shell: bash

tests/integration/use-cache.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ describe.skipIf(!nextVersionSatisfies('>=15.3.0-canary.13'))('use cache', () =>
159159
deployID: generateRandomObjectID(),
160160
siteID: v4(),
161161
} as FixtureTestContext
162+
ctx.debug = true
162163

163164
vi.stubEnv('SITE_ID', ctx.siteID)
164165
vi.stubEnv('DEPLOY_ID', ctx.deployID)

tests/utils/contexts.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ export interface FixtureTestContext extends TestContext {
1616
edgeFunctionPort: number
1717
edgeFunctionOutput: WriteStream
1818
cleanup?: (() => Promise<void>)[]
19+
debug?: boolean
1920
}

tests/utils/fixture.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,11 @@ export async function runPlugin(
293293
})
294294
const { asset } = result.manifest.bundles[0]
295295

296-
await execaCommand(`deno -v`, { cwd: dist, stdio: 'inherit' })
297-
await execaCommand(`deno info`, { cwd: dist, stdio: 'inherit' })
298-
await execaCommand(`which deno`, { cwd: dist, stdio: 'inherit' })
296+
if (ctx.debug) {
297+
await execaCommand(`deno -v`, { cwd: dist, stdio: 'inherit' })
298+
await execaCommand(`deno info`, { cwd: dist, stdio: 'inherit' })
299+
await execaCommand(`which deno`, { cwd: dist, stdio: 'inherit' })
300+
}
299301

300302
const cmd = `deno run --allow-read --allow-write --allow-net --allow-env ${eszipHelper} extract ./${asset} .`
301303
await execaCommand(cmd, { cwd: dist })

tools/deno/deno.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)