Skip to content

Commit

Permalink
chore: windows 也能正常测试
Browse files Browse the repository at this point in the history
Co-authored-by: ygqygq2 <[email protected]>
  • Loading branch information
ygqygq2 committed Apr 13, 2024
1 parent 9dba5b3 commit ace92b0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@
"compile": "npm run esbuild-base -- --sourcemap",
"package": "vsce package --no-dependencies",
"publish": "vsce publish --no-dependencies",
"clean": "rm -rf out/",
"clean": "rimraf out/",
"test-compile": "npm run clean && tsc -p ./ && npm run compile",
"test": "npm run test-compile && vscode-test",
"test:suite:mocha": "npm run test-compile && node out/test/runTests.js",
Expand Down Expand Up @@ -570,6 +570,7 @@
"jest-mock-vscode": "^3.0.2",
"lint-staged": "^15.2.2",
"mocha": "^10.4.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.11.1",
"tmp": "^0.2.3",
"ts-node": "^10.9.2",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/test/suite/common/executeCommandOnFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ async function executeCommandWithRetry(options: {

do {
await vscode.commands.executeCommand(commandName, { workspaceFolderName });
// 需要等待一段时间才能获取到结果
await sleep(250);
// 需要等待一段时间才能获取到结果,而且性能低的时候需要更长时间
await sleep(1000);
actual = doc.getText();
retryCount++;
} while (shouldRetry && originalText === actual && retryCount < 10);
Expand Down

0 comments on commit ace92b0

Please sign in to comment.