Skip to content

Commit e90e295

Browse files
committed
test: do not throw on which failures
1 parent be9c0ca commit e90e295

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/unit/typings-compatibility-test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ async function prepareTestPackage(
170170
async function getPackageManager() {
171171
const packageManagers = ["pnpm", "yarn", "npm"]
172172

173-
const versionResults = await Promise.all(packageManagers.map(pm => which(pm)))
173+
const versionResults: Array<string | null> = await Promise.all(
174+
packageManagers.map(pm => which(pm, {nothrow: true})),
175+
)
174176

175177
const packageManagerIndex = versionResults.findIndex(
176178
versionResult => typeof versionResult === "string",

0 commit comments

Comments
 (0)