Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/amazonq/src/lsp/lspInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import { fs, getNodeExecutableName, BaseLspInstaller, ResourcePaths } from 'aws-core-vscode/shared'
import path from 'path'
import { getAmazonQLspConfig } from './config'
import { LspConfig } from 'aws-core-vscode/amazonq'

export class AmazonQLspInstaller extends BaseLspInstaller.BaseLspInstaller {
constructor() {
super(getAmazonQLspConfig(), 'amazonqLsp')
constructor(lspConfig: LspConfig = getAmazonQLspConfig()) {
super(lspConfig, 'amazonqLsp')
}

protected override async postInstall(assetDirectory: string): Promise<void> {
Expand Down
31 changes: 31 additions & 0 deletions packages/amazonq/test/e2e/lsp/amazonqLsp.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import { AmazonQLspInstaller } from '../../../src/lsp/lspInstaller'
import { defaultAmazonQLspConfig } from '../../../src/lsp/config'
import { createLspInstallerTests } from './lspInstallerUtil'
import { LspConfig } from 'aws-core-vscode/amazonq'

describe('AmazonQLSP', () => {
createLspInstallerTests({
suiteName: 'AmazonQLSPInstaller',
lspConfig: defaultAmazonQLspConfig,
createInstaller: (lspConfig?: LspConfig) => new AmazonQLspInstaller(lspConfig),
targetContents: [
{
bytes: 0,
filename: 'servers.zip',
hashes: [],
url: 'http://fakeurl',
},
],
setEnv: (path: string) => {
process.env.__AMAZONQLSP_PATH = path
},
resetEnv: () => {
delete process.env.__AMAZONQLSP_PATH
},
})
})
282 changes: 0 additions & 282 deletions packages/amazonq/test/e2e/lsp/lspInstaller.test.ts

This file was deleted.

Loading