test(codemode): drop the slow split and matchAll cap cases (#49051)

This commit is contained in:
Aiden Cline
2026-09-14 16:24:27 -05:00
committed by GitHub
Unverified
parent 4fa6ca00e5
commit 2b855fccb2
+3 -3
View File
@@ -39,14 +39,14 @@ describe("one built-in cannot build an unbounded value", () => {
}
})
test("arrays: constructor, length, Array.from, split, matchAll, concat, flat", async () => {
// split and matchAll share the same result check but must build ten million items first to reach it,
// which is too slow for CI.
test("arrays: constructor, length, Array.from, concat, flat", async () => {
expect(await value(`return Array(${A}).length`)).toBe(A)
for (const code of [
`Array(${A + 1})`,
`const a = []; a.length = ${A + 1}`,
`Array.from({ length: ${A + 1} })`,
`"x".repeat(${S}).split("")`,
`"x".repeat(${A + 1}).matchAll(/x/g)`,
`Array(${A}).concat([1])`,
`[Array(${A}).fill(0), [1]].flat()`,
]) {