-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(remix): Add a boilerplate for Remix SDK integration tests. #5453
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
client
andserver
.Server
Using the utilities we have already implemented for
node-integration-tests
. Needs some extra features though, such as triggeringpost
requests to testaction
functions.Question 1: Seems to be working well so far, but Remix uses
fetch
internally by polyfilling it, andnock
ishttp
-only so might need to think about an alternative fornock
for newer node versions in the future?Client
Also used the helper utilities from our Playwright browser tests, did not need to implement
fixtures
or 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?