From 52f3f807bb8d4543c6f95560f3adee6718b6585a Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sun, 9 Jun 2024 17:55:59 +0200 Subject: [PATCH] Update vscode launch configuration and e2e test file paths --- .vscode/launch.json | 4 ++-- client/tests/e2e/suite/helpers.ts | 6 +++--- package.json | 6 +++--- server/package.json | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 848517e..c4af8a1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -82,9 +82,9 @@ "args": [ "--disable-extensions", "--extensionDevelopmentPath=${workspaceFolder}", - "--extensionTestsPath=${workspaceFolder}/client/out/e2e/suite/index" + "--extensionTestsPath=${workspaceFolder}/client/out/tests/e2e/suite/index" ], - "outFiles": ["${workspaceFolder}client/out/e2e/**/*.js"], + "outFiles": ["${workspaceFolder}client/out/tests/e2e/**/*.js"], "preLaunchTask": { "type": "npm", "script": "test-compile" diff --git a/client/tests/e2e/suite/helpers.ts b/client/tests/e2e/suite/helpers.ts index 39d742a..29edd10 100644 --- a/client/tests/e2e/suite/helpers.ts +++ b/client/tests/e2e/suite/helpers.ts @@ -1,6 +1,6 @@ -import * as vscode from "vscode"; -import * as path from "path"; import * as assert from "assert"; +import * as path from "path"; +import * as vscode from "vscode"; /** * Contains the document and its corresponding editor @@ -60,7 +60,7 @@ export async function waitForDiagnostics(docUri: vscode.Uri, timeoutInMillisecon } export const getDocPath = (filePath: string): string => { - return path.resolve(__dirname, path.join("..", "..", "..", "..", "test-data", filePath)); + return path.resolve(__dirname, path.join("..", "..", "..", "..", "..", "test-data", filePath)); }; export const getDocUri = (filePath: string): vscode.Uri => { diff --git a/package.json b/package.json index 0155651..17b3e5e 100644 --- a/package.json +++ b/package.json @@ -219,7 +219,7 @@ "postinstall": "cd client && npm install && cd ../server && npm install && cd ..", "lint": "eslint ./client/src ./server --ext .ts,.tsx", "format": "prettier --write .", - "clean": "rimraf client/dist && rimraf server/dist", + "clean": "rimraf client/dist && rimraf client/out && cd server && npm run clean && cd ..", "compile-servers": "cd server && npm run compile", "compile": "npm run clean && webpack --config ./client/webpack.config.js && npm run compile-servers", "vscode:prepublish": "npm run compile", @@ -230,8 +230,8 @@ "test-client": "cd client && npm test", "test-server": "cd server && npm test", "test-compile": "tsc --project ./client --outDir client/out", - "pretest:e2e": "npm run compile && npm run test-compile", - "test:e2e": "node ./client/out/e2e/runTests.js", + "pretest:e2e": "npm run clean && npm run compile && npm run test-compile", + "test:e2e": "node ./client/out/tests/e2e/runTests.js", "test-browser": "vscode-test-web --extensionDevelopmentPath=. ./test-data" }, "devDependencies": { diff --git a/server/package.json b/server/package.json index a75b4d1..7461cd8 100644 --- a/server/package.json +++ b/server/package.json @@ -6,6 +6,7 @@ "author": "davelopez", "license": "MIT", "scripts": { + "clean": "rimraf ./gx-workflow-ls-native/dist && rimraf ./gx-workflow-ls-format2/dist", "compile-native-server": "webpack --config ./gx-workflow-ls-native/webpack.config.js", "compile-format2-server": "webpack --config ./gx-workflow-ls-format2/webpack.config.js", "compile": "npm run compile-native-server && npm run compile-format2-server",