test(core): avoid shell PATH in command test (#34980)

This commit is contained in:
Aiden Cline 2026-07-02 12:28:58 -05:00 committed by GitHub
parent 967c44552e
commit c9604c86ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,11 +69,11 @@ describe("CommandV2", () => {
const command = yield* CommandV2.Service
yield* command.transform((editor) => {
editor.update("review", (command) => {
command.template = "Output: !`bun -e \"process.stdout.write('command-output')\"`"
command.template = "Output: !`echo command-output`"
})
})
expect(yield* command.evaluate({ name: "review" })).toEqual({ text: "Output: command-output" })
expect((yield* command.evaluate({ name: "review" })).text.replace(/\r?\n$/, "")).toEqual("Output: command-output")
}),
)