From fcc822e87923bfb5f51f736d204ec7e2977d7df8 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Wed, 6 Dec 2017 14:19:08 -0800 Subject: [PATCH] test version request --- src/harness/unittests/session.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/harness/unittests/session.ts b/src/harness/unittests/session.ts index 9912294d1d2..75660f75f32 100644 --- a/src/harness/unittests/session.ts +++ b/src/harness/unittests/session.ts @@ -169,6 +169,19 @@ namespace ts.server { allowNonTsExtensions: true // injected by tsserver }); }); + + it("Status request gives ts.version", () => { + const req: protocol.StatusRequest = { + command: CommandNames.Status, + seq: 0, + type: "request" + }; + + const expected: protocol.StatusResponseBody = { + version: ts.version + }; + assert.deepEqual(session.executeCommand(req).response, expected); + }); }); describe("onMessage", () => { @@ -220,6 +233,7 @@ namespace ts.server { CommandNames.Saveto, CommandNames.SignatureHelp, CommandNames.SignatureHelpFull, + CommandNames.Status, CommandNames.TypeDefinition, CommandNames.ProjectInfo, CommandNames.ReloadProjects,