-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Node 22 * this * this * this * this * this * Revert "this" This reverts commit 476231d. * Revert "this" This reverts commit b909e6a. * Revert "this" This reverts commit c68ed7c. * Revert "this" This reverts commit 1206b37. * Revert "this" This reverts commit 486b8b1. * try this * try this * boop * boop * try this
- Loading branch information
Showing
4 changed files
with
31 additions
and
5 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
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,21 @@ | ||
import { execa } from 'execa'; | ||
import fs from 'fs'; | ||
import semver from 'semver'; | ||
|
||
let testPaths = process.argv.slice(2); | ||
|
||
const nodeVersion = semver.parse(process.versions.node); | ||
if (nodeVersion && nodeVersion.major >= 21) { | ||
// Starting from version 21. Node test runner's cli changed how inputs to test CLI work. | ||
// See https://github.com/nodejs/node/issues/50219. | ||
testPaths = testPaths.map((path) => { | ||
if (fs.existsSync(path) && fs.statSync(path).isDirectory()) { | ||
return `${path}/**/*.test.?(c|m)js`; | ||
} | ||
return path; | ||
}); | ||
} | ||
|
||
await execa('tsx', ['--test', '--test-reporter', 'spec'].concat(testPaths), { | ||
stdio: 'inherit', | ||
}); |