mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-10 07:11:25 +03:00
test(codemode): drop the slow split and matchAll cap cases (#49051)
This commit is contained in:
committed by
GitHub
Unverified
parent
4fa6ca00e5
commit
2b855fccb2
@@ -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()`,
|
||||
]) {
|
||||
|
||||
Reference in New Issue
Block a user