Skip to content

Conversation

@brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Mar 16, 2023

Adding a toUpperCase() back that was removed in #10207 cause the spec is weird and doesn't uppercase patch: https://fetch.spec.whatwg.org/#concept-method

Relies on remix-run/web-std-io#30 before the unit test would actually fail otherwise

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2023

🦋 Changeset detected

Latest commit: ec14142

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@remix-run/router Patch
react-router Patch
react-router-dom Patch
react-router-dom-v5-compat Patch
react-router-native Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

});

// https://fetch.spec.whatwg.org/#concept-method
it("properly handles method=PATCH weirdness", async () => {
Copy link
Contributor Author

@brophdawg11 brophdawg11 Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't fail (without the code fix) at the moment - I think our fetch polyfill is probably uppercasing all methods, so we should update that to force this test to be able to fail

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e = _e;
}
expect(e).toMatchInlineSnapshot(
`[Error: query()/queryRoute() requests must contain an AbortController signal]`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've since fixed our Request implementation to match the spec so it always has a signal. It's no longer possible to create one without a signal so altered these tests to just confirm that

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants