Skip to content

Commit

Permalink
Windows sucks
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesrosiers committed Oct 18, 2024
1 parent 37fbd35 commit 315e2ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "./src/server.js",
"scripts": {
"lint": "eslint src",
"test": "vitest --watch=false",
"test": "vitest --watch=false --allowOnly src/services/schemas-neovim.test.ts",
"coverage": "vitest run --coverage",
"type-check": "tsc --noEmit"
},
Expand Down
3 changes: 3 additions & 0 deletions language-server/src/services/schemas-neovim.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ describe("Feature - workspace (neovim)", () => {
const schemaUris: string[] = [];

client.onNotification(PublishDiagnosticsNotification.type, (params) => {
console.log("PublishDiagnosticsNotification", params.uri);
schemaUris.push(params.uri);
});

console.log("writeDocument");
await client.writeDocument("./subjectB.schema.json", `{ "$schema": "https://json-schema.org/draft/2020-12/schema" }`);
console.log("document written");

expect(schemaUris).to.eql([documentUriA, documentUriB]);
});
Expand Down
3 changes: 3 additions & 0 deletions language-server/src/test/test-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export class TestClient<Configuration> {
const buildCompleted = this.buildCompleted();

if (this.watchEnabled) {
console.log("Send DidChangeWatchedFiles");
await this.client.sendNotification(DidChangeWatchedFilesNotification.type, {
changes: [{
type: exists ? FileChangeType.Changed : FileChangeType.Created,
Expand Down Expand Up @@ -312,7 +313,9 @@ export class TestClient<Configuration> {
private buildCompleted() {
return new Promise<void>((resolve) => {
this.client.onRequest(WorkDoneProgressCreateRequest.type, ({ token }) => {
console.log("WorkDonProgressCreateRequest");
this.client.onProgress(WorkDoneProgress.type, token, ({ kind }) => {
console.log("WorkDonProgress", kind);
if (kind === "end") {
resolve();
}
Expand Down

0 comments on commit 315e2ba

Please sign in to comment.