-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The custom Jest test runner was originally written to install the required extensions for the CLI integration tests. This is no longer necessary as of #3232, so we can remove all code that deals with downloading VS Code and installing extensions. The download of VS Code will now be handled by the base `VSCodeTestRunner`.
- Loading branch information
Showing
5 changed files
with
23 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
extensions/ql-vscode/test/vscode-tests/jest-runner-installed-extensions.ts
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
extensions/ql-vscode/test/vscode-tests/jest-runner-vscode-codeql-cli.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type * as JestRunner from "jest-runner"; | ||
import VSCodeTestRunner from "jest-runner-vscode"; | ||
import { ensureCli } from "./ensureCli"; | ||
|
||
export default class JestRunnerVscodeCodeqlCli extends VSCodeTestRunner { | ||
async runTests( | ||
tests: JestRunner.Test[], | ||
watcher: JestRunner.TestWatcher, | ||
onStart: JestRunner.OnTestStart, | ||
onResult: JestRunner.OnTestSuccess, | ||
onFailure: JestRunner.OnTestFailure, | ||
): Promise<void> { | ||
// The CLI integration tests require the CLI to be available. We do not want to install the CLI | ||
// when VS Code is already running because this will not give any feedback to the test runner. Instead, | ||
// we'll download the CLI now and pass the path to the CLI to VS Code. | ||
await ensureCli(true); | ||
|
||
return super.runTests(tests, watcher, onStart, onResult, onFailure); | ||
} | ||
} |