Skip to content

Commit 8bb8f95

Browse files
committed
test(vite): check only the dev server's output and IPC streams
Its stdin depends on whether the CLI's key shortcuts will read the terminal, which the startViteDevServer specs pin. The spawn comment no longer claims a silent server behaves as with plain inherit.
1 parent bff27b7 commit 8bb8f95

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎lib/services/bundler/bundler-compiler-service.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -750,12 +750,10 @@ export class BundlerCompilerService
750750

751751
const options: { [key: string]: any } = {
752752
cwd: projectData.projectDir,
753-
// Logs stream straight to the user. The IPC channel only carries
754-
// app-restart requests; a server that never sends one behaves as
755-
// with plain "inherit".
756-
// Vite reads a terminal stdin for shortcuts of its own, which would
757-
// take the keys meant for the CLI's; otherwise its shortcuts are the
758-
// only ones the terminal has.
753+
// Logs stream straight to the user; the IPC channel carries
754+
// app-restart requests. Vite reads a terminal stdin for shortcuts of
755+
// its own, which would take the keys meant for the CLI's; otherwise
756+
// its shortcuts are the only ones the terminal has.
759757
stdio: [
760758
commandShortcutsOwnTerminal() ? "ignore" : "inherit",
761759
"inherit",

‎test/services/bundler/bundler-compiler-service.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,7 @@ describe("BundlerCompilerService", () => {
680680
});
681681

682682
it("opens an IPC channel and keeps the output inherited", () => {
683-
assert.deepStrictEqual(spawnOptions.stdio, [
684-
"inherit",
683+
assert.deepStrictEqual(spawnOptions.stdio.slice(1), [
685684
"inherit",
686685
"inherit",
687686
"ipc",

0 commit comments

Comments
 (0)