Skip to content

Commit e1bd570

Browse files
committed
fix: added auto-languageclient's test
1 parent 220c9fd commit e1bd570

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/auto-languageclient.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,14 @@ describe("AutoLanguageClient", () => {
209209
expect(client.shouldSyncForEditor(editor, "/path/to/somewhere")).toBe(false)
210210
})
211211
})
212+
213+
describe("getLanguageIdFromEditor", () => {
214+
const client = setupClient()
215+
216+
it("returns the editor's grammar name", () => {
217+
const editor = new TextEditor()
218+
spyOn(editor, "getGrammar").and.returnValue({ name: "testGrammarName" } as any)
219+
expect((client as any).getLanguageIdFromEditor(editor)).toBe("testGrammarName")
220+
})
221+
})
212222
})

0 commit comments

Comments
 (0)