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
commit fe09a2e9b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 741 additions and 47 deletions

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")