Skip to content

Commit fcc822e

Browse files
committed
test version request
1 parent 03e93d8 commit fcc822e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/harness/unittests/session.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,19 @@ namespace ts.server {
169169
allowNonTsExtensions: true // injected by tsserver
170170
});
171171
});
172+
173+
it("Status request gives ts.version", () => {
174+
const req: protocol.StatusRequest = {
175+
command: CommandNames.Status,
176+
seq: 0,
177+
type: "request"
178+
};
179+
180+
const expected: protocol.StatusResponseBody = {
181+
version: ts.version
182+
};
183+
assert.deepEqual(session.executeCommand(req).response, expected);
184+
});
172185
});
173186

174187
describe("onMessage", () => {
@@ -220,6 +233,7 @@ namespace ts.server {
220233
CommandNames.Saveto,
221234
CommandNames.SignatureHelp,
222235
CommandNames.SignatureHelpFull,
236+
CommandNames.Status,
223237
CommandNames.TypeDefinition,
224238
CommandNames.ProjectInfo,
225239
CommandNames.ReloadProjects,

0 commit comments

Comments
 (0)