test(remix): Add a boilerplate for Remix SDK integration tests.#5453
test(remix): Add a boilerplate for Remix SDK integration tests.#5453AbhiPrasad merged 19 commits intomasterfrom
Conversation
fd80fe1 to
bcd82bd
Compare
71babdd to
02a8e82
Compare
02a8e82 to
49fc12b
Compare
Until it breaks, lets stick with this.
Yes let's move stuff into a utils package. In fact, let's make it |
|
Actually it seems @lobsterkatie worked on #5038 - which introduces a |
Ah, yeah, that got hung up on... something. I'll dig it back up and maybe it will come to me. Anyway, yeah, let's at least get the skeleton in there, and then we can move stuff into it over time. Eventually I'd love to see the node and browser integration tests move into their respective package directories, and consolidating the utility functions seems like a good start. I'll look at it again tomorrow or early next week. |
|
Alright so let's stick with this for now then, and move stuff over to a package once Katie is done with her work (feel free to pass it off btw - I'm sure any one of us can take it to the finish line). @onurtemizkan will do a more detailed review in a bit. |
AbhiPrasad
left a comment
There was a problem hiding this comment.
This is a great start!
Adds an integration testing boilerplate for Remix SDK and sample tests for client and server.
As the line between client and server is blurred in Remix sources, all scenarios are defined in a common Remix application, but tested separately for
clientandserver.Server
Using the utilities we have already implemented for
node-integration-tests. Needs some extra features though, such as triggeringpostrequests to testactionfunctions.Question 1: Seems to be working well so far, but Remix uses
fetchinternally by polyfilling it, andnockishttp-only so might need to think about an alternative fornockfor newer node versions in the future?Client
Also used the helper utilities from our Playwright browser tests, did not need to implement
fixturesor anything, as it seems these tests will be fairly simple.Question 2: Assuming we can also use those utilities from browser/node integration tests for other SDKs, it might be nice to convert those to an internal package like
@sentry-internal/integration-test-utils. This set of tests uses them by re-exporting via relative paths, and that doesn't look great IMO. WDYT?