Skip to content

Re-do jsdom errors in the virtual console - #3866

Merged
domenic merged 1 commit into
mainfrom
error-types
Apr 20, 2025
Merged

domenic merged 1 commit into
mainfrom
error-types

Conversation

@domenic

@domenic domenic commented Apr 20, 2025

Copy link
Copy Markdown
Member
  • Rename sendTo() to forwardTo(). This helps people realize the method now has new semantics.

  • Changed from { omitJSDOMErrors: true } to { jsdomErrors } which can be undefined, "none", or a list of jsdom error types to forward.

  • Changed and consolidated error types and properties, from their previous undocumented form (usually a type and a detail) into a well-documented form with more structured properties.

  • Stopped emitting jsdom errors for failed XHRs, similar to how browsers no longer display those in the console.

  • Generally expanded test coverage for the jsdom errors.

Closes #3596.

* Rename sendTo() to forwardTo(). This helps people realize the method now has new semantics.

* Changed from { omitJSDOMErrors: true } to { jsdomErrors } which can be undefined, "none", or a list of jsdom error types to forward.

* Changed and consolidated error types and properties, from their previous undocumented form (usually a type and a detail) into a well-documented form with more structured properties.

* Stopped emitting jsdom errors for failed XHRs, similar to how browsers no longer display those in the console.

* Generally expanded test coverage for the jsdom errors.

Closes #3596.
@domenic domenic added the metr uplift A candidate for the METR Uplift experiment label Apr 20, 2025
@domenic

domenic commented Apr 20, 2025

Copy link
Copy Markdown
Member Author

Implementation report:

It was definitely nice to have AI for this task. I was using Cursor, but mostly in tab-complete mode. For this sort of situation where I was doing a lot of updating from the old style to the new, or renaming things, tab-complete mode was great. In particular it was good (but not perfect) at anticipating what the next change I wanted to make was.

I briefly used the agent mode, with gemini-2.5-pro-exp-03-25, to adapt some old tests to the new API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metr uplift A candidate for the METR Uplift experiment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enumerate the possible jsdomError.type strings

1 participant