Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Nov 7, 2024
1 parent 3079f5d commit cfd2063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/suite/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ describe("Utils", () => {

it("should return true if a workspace folder is opened", () => {
sinon.stub(vscode.workspace, "workspaceFolders").get(() => [{}]);
const result = coreUtils.hasWorkspaceOrShowOption();
const result = coreUtils.hasWorkspaceOrShowOption("Test");
assert.strictEqual(result, true);
});

it("should return false and display message if no workspace", () => {
const stub = sinon.stub(vscode.window, "showWarningMessage").resolves();
const result = coreUtils.hasWorkspaceOrShowOption();
const result = coreUtils.hasWorkspaceOrShowOption("Test");
assert.strictEqual(result, false);
assert.ok(stub.calledOnce);
});
Expand Down

0 comments on commit cfd2063

Please sign in to comment.