diff --git a/tests/one.ts b/tests/one.ts index 1515b349..89ee0470 100644 --- a/tests/one.ts +++ b/tests/one.ts @@ -1,5 +1,5 @@ +import { runInRepo, $ } from '../utils.ts' import type { RunOptions } from '../types.d.ts' -import { runInRepo } from '../utils.ts' export async function test(options: RunOptions) { await runInRepo({ @@ -7,7 +7,8 @@ export async function test(options: RunOptions) { repo: 'onejs/one', branch: 'main', build: ['clean:build', 'build'], - beforeTest: 'yarn playwright install chromium', + beforeInstall: async () => $`npm install -g bun`, + beforeTest: 'bunx playwright install chromium', test: 'test:vite-ecosystem-ci', }) } diff --git a/utils.ts b/utils.ts index 6e3ee361..051cbf5a 100644 --- a/utils.ts +++ b/utils.ts @@ -624,6 +624,11 @@ export async function applyPackageOverrides( pkg.devDependencies[name] = version } } + } else if (pm === 'bun') { + pkg.overrides = { + ...pkg.overrides, + ...overrides, + } } else { throw new Error(`unsupported package manager detected: ${pm}`) } @@ -637,6 +642,8 @@ export async function applyPackageOverrides( await $`yarn install` } else if (pm === 'npm') { await $`npm install` + } else if (pm === 'bun') { + await $`bun install` } }