-
Notifications
You must be signed in to change notification settings - Fork 135
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
Interoperability for test helpers #1939
Comments
Hi there 👋 Thanks for the flag! If you would like to contribute a PR, for these changes the team would prioritize reviewing. |
Thanks @lizkenyon, IMHO the team should probably figure out how the tests would work first. Before making any changes I'd want to know they'd be tested in both Node.js and browser environments going forward. Without that there's a pretty good chance my PR would break someone else's environment, or someone else's future PR would break mine. |
We're labeling this issue as stale because there hasn't been any activity on it for 60 days. While the issue will stay open and we hope to resolve it, this helps us prioritize community requests. You can add a comment to remove the label if it's still relevant, and we can re-evaluate it. |
Not stale. |
We'd like to be able to use the
setUpValidRequest()
andsetUpValidSession()
test helpers in a browser environment. Right now they only work in a Node.js environment, and I haven't had any luck with polyfills.Our use case is mocking Shopify app authentication in Storybook.
For now we've rolled our own interoperable helpers with two main changes.
We're using Jose for JWT signing:
And we're using
btoa()
(which is not deprecated in Node.js!) to encode the host:With these changes we get interop across multiple runtimes.
The text was updated successfully, but these errors were encountered: