From 574c07356686251bbf8035b63f55ca67a35606ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20L=C3=A9vesque?= Date: Sun, 7 Feb 2021 14:55:59 -0500 Subject: [PATCH] Navigate to current project before executing tests --- src/commands/runTestFromCodeLens.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/runTestFromCodeLens.ts b/src/commands/runTestFromCodeLens.ts index 90e9d1d..0d7d5f9 100644 --- a/src/commands/runTestFromCodeLens.ts +++ b/src/commands/runTestFromCodeLens.ts @@ -1,6 +1,7 @@ import { window } from "vscode"; type RunArgs = { + projectDir: string, filePath: string, describe: string | null, testName?: string, @@ -13,7 +14,8 @@ export default function runFromCodeLens(args: RunArgs): void { elixirLsTerminal.show() elixirLsTerminal.sendText('clear') - elixirLsTerminal.sendText(buildTestCommand(args)); + elixirLsTerminal.sendText(`cd ${args.projectDir}`) + elixirLsTerminal.sendText(buildTestCommand(args)) } function buildTestCommand(args: RunArgs): string {