It does so by setting up a client and a server (communicating over in-process streams), and then sending requests from the client to the server. (This pattern can be used to test other parts of the server too).
To test this, we have to build the index that powers the auto completion. This is done by indexing typescript and gherkin sources. There is a new Settings type for configuring the server, and a corresponding settings screen must be built in the vscode extension.
The new test runs with npm run test:cjs, but it doesn't run in esm mode. This is because the import from vscode-jsonrpc/node in CucumberLanguageServer.test.ts doesn't work with esm (it's not a declared export in the module).
I think we should consider making the language server a non-esm module - I don't think it needs to be.
This adds an acceptance test for the textDocument/completion request.
It does so by setting up a client and a server (communicating over in-process streams), and then sending requests from the client to the server. (This pattern can be used to test other parts of the server too).
To test this, we have to build the index that powers the auto completion. This is done by indexing typescript and gherkin sources. There is a new
Settings
type for configuring the server, and a corresponding settings screen must be built in the vscode extension.The new test runs with
npm run test:cjs
, but it doesn't run in esm mode. This is because the import fromvscode-jsonrpc/node
inCucumberLanguageServer.test.ts
doesn't work with esm (it's not a declared export in the module). I think we should consider making the language server a non-esm module - I don't think it needs to be.