Skip to content

Commit

Permalink
Test for presence of shadowenv binary before running Shadowenv suite
Browse files Browse the repository at this point in the history
Not all non-Shopify developer environments have a version of shadowenv
installed. In those circumstances, skip the suite with a console warning.

Part of #2877
  • Loading branch information
adam12 committed Nov 28, 2024
1 parent 3b5a9ff commit 3e37b46
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vscode/src/test/suite/ruby/shadowenv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ import { LOG_CHANNEL, asyncExec } from "../../../common";
import { RUBY_VERSION } from "../../rubyVersion";
import * as common from "../../../common";

suite("Shadowenv", () => {
suite("Shadowenv", async () => {
if (os.platform() === "win32") {
// eslint-disable-next-line no-console
console.log("Skipping Shadowenv tests on Windows");
return;
}

try {
await asyncExec("shadowenv --version");
} catch {
console.log("Skipping Shadowenv tests because no `shadowenv` found");

Check warning on line 27 in vscode/src/test/suite/ruby/shadowenv.test.ts

View workflow job for this annotation

GitHub Actions / lint_node

Unexpected console statement
return;
}

let rootPath: string;
let workspacePath: string;
let workspaceFolder: vscode.WorkspaceFolder;
Expand Down

0 comments on commit 3e37b46

Please sign in to comment.