Files
orca/src/shared/node-pty-spawn-helper.test.ts
T
Neil 34999e328e fix(orcad): stop demanding a spawn-helper only macOS builds (#18122)
node-pty declares the spawn-helper target inside binding.gyp's OS=="mac"
block and pty.cc execs it only under __APPLE__. Asserting it on
`!== 'win32'` made every Linux orcad boot degraded with
spawn_helper_missing while its terminals worked fine.

Route all four sites through one shared `usesNodePtySpawnHelper`
predicate: the precondition verdict, the prebuilt slot install, the
+x repair, and the prebuilds build script (which threw outright on a
Linux slot build).

Fixes #17844
2026-09-02 02:49:09 -07:00

15 lines
646 B
TypeScript

import { describe, expect, it } from 'vitest'
import { usesNodePtySpawnHelper } from './node-pty-spawn-helper'
describe('usesNodePtySpawnHelper', () => {
it('is macOS only', () => {
// The predicate this file exists for: node-pty's binding.gyp declares the
// spawn-helper target inside OS=="mac". Reading it as "every non-Windows platform"
// is what reported spawn_helper_missing on healthy Linux hosts (#17844).
expect(usesNodePtySpawnHelper('darwin')).toBe(true)
for (const platform of ['linux', 'win32', 'freebsd', 'openbsd', 'sunos', 'aix']) {
expect(usesNodePtySpawnHelper(platform)).toBe(false)
}
})
})