-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tests for the RSC shim #6
base: main
Are you sure you want to change the base?
Conversation
Hmm, just a thought: might it make sense to directly import the react dist files for the different environments and compare those with the rsc export? Generally: A little bit of duplication is not a bad thing - too much abstraction makes tests harder to read :) It's already late, so I'll take a closer look tomorrow! |
Oh don't worry, the last commit is already slightly de-abstractionized :D the original was worse lol. But lmk which bits you think we should de-abstractionize further, i have a penchant for deduplicating my tests to death lol
well, the issue is that ...but also i think it'd be better to stick to plain |
|
||
const missingFactories = ["createContext", "createFactory"]; | ||
|
||
const missingClasses = ["Component", "PureComponent"]; |
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.
TODO - tests for classes
My idea was somewhere along the lines of
|
Just sketching some stuff out. Not sure if i like the conditional bits... but it's hard to do that otherwise w/o a ton of duplication. for example,
useContext
seems to exist in the RSC world in the React version we're installing! Lemme know what you think or if you have ideas on how to structure this better.