-
Notifications
You must be signed in to change notification settings - Fork 61
STITCH 2497: Remove core dependency on cross-fetch #230
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
Conversation
adamchel
left a comment
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.
Nice work! Had a couple nits, but otherwise this looks great!
packages/browser/core/src/core/internal/net/BrowserFetchStreamTransport.ts
Show resolved
Hide resolved
packages/core/sdk/__tests__/internal/net/StitchRequestClientUnitTests.ts
Show resolved
Hide resolved
| } from "mongodb-stitch-core-sdk"; | ||
|
|
||
| /** @hidden */ | ||
| export default class JestEventSourceEventStream extends BaseEventStream<JestEventSourceEventStream> { |
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.
[broader discussion] So this works and I know it's what I told you to do, but now this means that the Transports we wrote are not covered at all by our tests unless we do E2E browser, Node.js, and React Native testing.
We aren't going to make changes to the other transports again for a while probably, but it might be a good idea to file a backlog ticket to do some very rudimentary E2E smoke testing with an actual node server, actual react native app, and actual browser (via something like selenium) to make sure the transports properly interact with the network.
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.
thoughts @jsflax ?
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.
Considering how core of an element the transports are, I think we should add some basic tests to make sure everything still works, before merging this. More can be added later.
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.
The point is that these transports can't be tested in Jest, so we'd have to create an entire E2E testing strategy, which I feel is out of scope for this ticket, which was meant to fix a bug.
Tyler did do some manual E2E in the browser to make sure the transports still work, and I think it would be good to merge if he did the same for Server and RN
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.
Ah, fair point. That works for me.
Added in a few quick fixes for alphabetizing the export lists. Furthermore, not sure if we should test to make sure it works properly in react native