test(desktop): port backend-connection-state test to vitest

Rebased onto current main, where the electron test harness migrated from
node:test to vitest (test:desktop:platforms = `vitest run --project electron`,
auto-discovering electron/*.test.ts). Swap the node:test import for vitest and
drop the .ts-extension import hack; the obsolete package.json node --test list
edit is dropped in the cherry-pick resolution since vitest auto-discovers.

Co-authored-by: Gille <4317663+helix4u@users.noreply.github.com>
This commit is contained in:
Brooklyn Nicholson 2026-07-16 14:55:58 -04:00
parent 71fa56e8ac
commit ee8275a8b2

View file

@ -1,9 +1,8 @@
import assert from 'node:assert/strict'
import test from 'node:test'
// Node 22's direct TypeScript runner requires the extension on Windows.
// @ts-expect-error The Electron tsconfig intentionally disables TS extension imports.
import { createBackendConnectionState } from './backend-connection-state.ts'
import { test } from 'vitest'
import { createBackendConnectionState } from './backend-connection-state'
type FakeProcess = { id: string }