-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3234 from github/koesie10/remove-jest-runner-inst…
…alled-extensions Simplify custom Jest test runner
- 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); | ||
} | ||
} |