Skip to content

Commit

Permalink
fixup! test: fails to uninstall Next LS
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed Mar 2, 2024
1 parent 63edc2f commit 3939eb5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/test/suite/extension.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as assert from "assert";
import * as fs from "fs";
import * as path from "path";
import * as os from "os";

// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
Expand Down Expand Up @@ -53,11 +54,13 @@ suite("Extension Test Suite", () => {
let showErrorMessage = sinon.stub(vscode.window, "showErrorMessage");
await uninstall.run("./test-bin");

assert.equal(
assert.match(
showErrorMessage.getCall(0).args[0],
/Failed to uninstall Next LS from/
);
assert.match(
showErrorMessage.getCall(0).args[0],
`Failed to uninstall Next LS from ${path.normalize(
"test-bin/nextls"
)} due to Error: ENOENT: no such file or directory, lstat 'test-bin/nextls'`
/due to Error: ENOENT: no such file or directory, lstat/
);
});
});

0 comments on commit 3939eb5

Please sign in to comment.