feat(codemode): support Promise.any and new Promise construction (#36339)

This commit is contained in:
Aiden Cline
2026-07-10 20:46:13 -05:00
committed by GitHub
parent 59202356fe
commit fe09a2e9b7
10 changed files with 743 additions and 49 deletions
+2 -1
View File
@@ -672,9 +672,10 @@ describe("CodeMode public contract", () => {
expect(instructions).toContain("not a general-purpose runtime")
expect(instructions).not.toContain("Standard modern JavaScript works")
expect(instructions).not.toContain("TypeScript type annotations")
for (const missing of ["Modules/imports", "classes", "generators", "fetch", "new Promise(...)"]) {
for (const missing of ["Modules/imports", "classes", "generators", "fetch"]) {
expect(instructions).toContain(missing)
}
expect(instructions).not.toContain("new Promise(...) are unavailable")
expect(instructions).not.toContain("promise chaining")
expect(instructions).toContain("URL, URLSearchParams, and URI encoding helpers")
expect(instructions).not.toContain("host globals")