Skip to content

Commit 04ae291

Browse files
committed
test: skip unsupported test variants
1 parent e16c1af commit 04ae291

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

scripts/testing/test-matrix.mts

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,20 +338,29 @@ if (platforms.length === 0) {
338338
process.exitCode = 1;
339339
showBanner(red("No valid platforms were specified"));
340340
} else {
341-
TEST_VARIANTS.reduce(
342-
(job, variant) => {
343-
return job.then(() =>
344-
withReactNativeVersion(version, async () => {
345-
for (const platform of platforms) {
346-
await buildRunTest({ version, platform, variant });
347-
}
348-
})
349-
);
350-
},
351-
waitForUserInput(
352-
`${TAG} Before continuing, make sure all emulators/simulators and Appium/Metro instances are closed.\n${TAG}\n${TAG} Press any key to continue...`
341+
TEST_VARIANTS.filter((variant) =>
342+
platforms.some((platform) =>
343+
PLATFORM_CONFIG[platform].isAvailable({
344+
version,
345+
platform,
346+
variant,
347+
engine: "hermes",
348+
})
353349
)
354350
)
351+
.reduce(
352+
(job, variant) =>
353+
job.then(() =>
354+
withReactNativeVersion(version, async () => {
355+
for (const platform of platforms) {
356+
await buildRunTest({ version, platform, variant });
357+
}
358+
})
359+
),
360+
waitForUserInput(
361+
`${TAG} Before continuing, make sure all emulators/simulators and Appium/Metro instances are closed.\n${TAG}\n${TAG} Press any key to continue...`
362+
)
363+
)
355364
.then(() => {
356365
showBanner("Initialize new app");
357366
$(

0 commit comments

Comments
 (0)