-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt the debug and test scripts for
vscode-jest-runner
to be compa…
…tible with Vitest. (#1923) * fixed vscode test runner for debugging tests * added comment * Apply suggestions from code review Co-authored-by: Peter Sutter <[email protected]> * Update test.cjs --------- Co-authored-by: Peter Sutter <[email protected]>
- Loading branch information
1 parent
3b75885
commit 87cb207
Showing
6 changed files
with
56 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env node | ||
// | ||
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
const assert = require('assert').strict | ||
const { spawn } = require('child_process') | ||
const { findYarnWorkspace } = require('./helper.cjs') | ||
|
||
const args = process.argv.slice(3) | ||
const workspace = findYarnWorkspace(args[0]) | ||
assert(workspace, 'yarn workspace not found') | ||
|
||
if (workspace.name === '@gardener-dashboard/frontend') { | ||
const index = args.indexOf('--runInBand') | ||
if (index !== -1) { | ||
args.splice(index, 1) | ||
} | ||
} | ||
args.push('--maxConcurrency=1', '--testTimeout=0') | ||
|
||
const cmd = spawn('yarn', ['workspace', workspace.name, 'run', 'test', ...args], { | ||
stdio: 'inherit', | ||
env: process.env, | ||
}) | ||
cmd.once('error', err => process.stderr.write(err.message + '\n')) | ||
cmd.once('exit', code => process.exit(code)) |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
#!/usr/bin/env node | ||
// | ||
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
const assert = require('assert').strict | ||
const { spawn } = require('child_process') | ||
const { findYarnWorkspace } = require('./helper.cjs') | ||
|
||
const args = process.argv.slice(2) | ||
const workspace = findYarnWorkspace(args[0]) | ||
assert(workspace, 'yarn workspace not found') | ||
|
||
const cmd = spawn('yarn', ['workspace', workspace.name, 'run', 'test', ...args], { | ||
stdio: 'inherit' | ||
}) | ||
cmd.once('error', err => process.stderr.write(err.message + '\n')) | ||
cmd.once('exit', code => process.exit(code)) |
This file was deleted.
Oops, something went wrong.