You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to be able to use the setUpValidRequest() and setUpValidSession() 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.
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'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: