Files
orca/config/scripts/run-vitest.mjs
T
Neil 3ec38b8c6d Run Vitest on Bun with Node runtime contracts (#25840)
* Run Vitest on Bun while preserving Node runtime contracts

* Preserve runtime timing provenance and keep the Bun pin in config

* Scope builtin compatibility mocks to test-only lint exceptions

* Give capture retention fixtures distinct filesystem timestamps

* Await the copy button success state in the React fixture

* Bound Node test worker shutdown and tighten migration fixtures
2026-10-06 03:18:06 -07:00

25 lines
723 B
JavaScript

import { resolve } from 'node:path'
import { runProcessSync } from './script-child-process.mjs'
const root = resolve(import.meta.dirname, '../..')
try {
const result = runProcessSync({
program: 'bun',
args: ['--bun', resolve(root, 'node_modules/vitest/vitest.mjs'), ...process.argv.slice(2)],
cwd: root,
env: {
...process.env,
ORCA_BACKGROUND_LAUNCH: '1',
ORCA_TEST_NODE_EXECUTABLE: process.execPath,
ORCA_TEST_NODE_VERSION: process.versions.node
},
stdio: 'inherit',
timeoutMs: null
})
process.exitCode = result.code ?? 1
} catch (error) {
console.error('Could not start Vitest. Install the Bun version in config/bun-version.', error)
process.exitCode = 1
}