Files
orca/config/scripts/desktop-distribution/runtime-verification/smoke-process-host-node18.mjs
Neil 6bb2e13c35 refactor(tooling): organize remaining scripts by domain owners (#38407)
* refactor(tooling): group remaining scripts by concrete domain owners

* fix(tooling): preserve relocated launcher resource roots
2026-11-05 00:29:16 -08:00

28 lines
1.0 KiB
JavaScript

#!/usr/bin/env node
import assert from 'node:assert/strict'
import { mkdtemp, rm } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import {
runPackagedProcessHostConsumer,
stagePackagedProcessHost,
writePackagedProcessHostConsumer
} from './packaged-process-host-fixture.mjs'
// Qualifies the package's engines floor against the staged public output, not the checkout source.
assert.match(process.versions.node, /^18\./, 'This smoke test must run under Node 18')
const resourcesDir = await mkdtemp(join(tmpdir(), 'orca-process-host-node18-'))
try {
await stagePackagedProcessHost(resourcesDir)
const { entry } = await writePackagedProcessHostConsumer(resourcesDir)
const result = runPackagedProcessHostConsumer(process.execPath, resourcesDir, entry)
assert.equal(result.code, 0, result.stderr)
assert.equal(result.stdout, 'copied-runtime')
} finally {
await rm(resourcesDir, { recursive: true, force: true })
}
console.log(`Node ${process.versions.node} process-host package smoke passed.`)