Skip to content

Commit a147a91

Browse files
committed
chore(vscode): lint the tests folder
1 parent a59ecfe commit a147a91

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

vscode/extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
},
118118
"scripts": {
119119
"ci": "pnpm run lint && pnpm run compile && pnpm run test:unit",
120-
"lint": "eslint src",
121-
"lint:fix": "eslint src --fix",
120+
"lint": "eslint src tests",
121+
"lint:fix": "eslint src tests --fix",
122122
"test:unit": "vitest run",
123123
"code-server": "code-server",
124124
"test:e2e": "pnpm run vscode:package && playwright test",

vscode/extension/tests/extension.setup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { execSync } from 'child_process'
33
import path from 'path'
44
import fs from 'fs-extra'
55
import { createHash } from 'crypto'
6+
import os from 'os'
67

78
setup('prepare extension', async () => {
89
console.log('Setting up extension for Playwright tests...')
@@ -32,7 +33,7 @@ setup('prepare extension', async () => {
3233

3334
// Create a temporary user data directory for the installation
3435
const tempUserDataDir = await fs.mkdtemp(
35-
path.join(require('os').tmpdir(), 'vscode-test-install-user-data-'),
36+
path.join(os.tmpdir(), 'vscode-test-install-user-data-'),
3637
)
3738

3839
try {

vscode/extension/tests/lineage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test, expect, Page } from '@playwright/test'
1+
import { test, Page } from '@playwright/test'
22
import path from 'path'
33
import fs from 'fs-extra'
44
import os from 'os'

vscode/extension/tests/python_env.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ test.describe('python environment variable injection on sqlmesh_lsp', () => {
6969
test('normal setup - error ', async ({ page }, testInfo) => {
7070
testInfo.setTimeout(120_000)
7171

72-
const [tempDir, _] = await setupEnvironment()
72+
const [tempDir] = await setupEnvironment()
7373
writeEnvironmentConfig(tempDir)
7474

7575
const context = await startCodeServer({
@@ -87,7 +87,7 @@ test.describe('python environment variable injection on sqlmesh_lsp', () => {
8787
test('normal setup - set', async ({ page }, testInfo) => {
8888
testInfo.setTimeout(120_000)
8989

90-
const [tempDir, _] = await setupEnvironment()
90+
const [tempDir] = await setupEnvironment()
9191
writeEnvironmentConfig(tempDir)
9292
const env_file = path.join(tempDir, '.env')
9393
fs.writeFileSync(env_file, 'TEST_VAR=test_value')

vscode/extension/tests/tcloud.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ test('signed in and not installed shows installation window', async ({
173173
.click()
174174

175175
await page.waitForSelector('text=Installing enterprise python package')
176-
expect(
177-
await page.locator('text=Installing enterprise python package'),
176+
await expect(
177+
page.locator('text=Installing enterprise python package'),
178178
).toHaveCount(2)
179179

180180
await page.waitForSelector('text=Loaded SQLMesh context')

vscode/extension/tests/utils_code_server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ export async function startCodeServer({
105105
reject(new Error('Code-server failed to start within timeout'))
106106
}, 30000)
107107

108-
codeServerProcess.stdout?.on('data', data => {
108+
codeServerProcess.stdout?.on('data', (data: Buffer) => {
109109
output += data.toString()
110110
if (output.includes('HTTP server listening on')) {
111111
clearTimeout(timeout)
112112
resolve()
113113
}
114114
})
115115

116-
codeServerProcess.stderr?.on('data', data => {
116+
codeServerProcess.stderr?.on('data', (data: Buffer) => {
117117
console.error('Code-server stderr:', data.toString())
118118
})
119119

0 commit comments

Comments
 (0)