Skip to content
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

Polyfill window.crypto.getRandomValues in tests #2808

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

garrettjstevens
Copy link
Collaborator

fixes #2794

The polyfills window.crypto.getRandomValues in the tests since it isn't implemented in JSDOM.

@cmdcolin
Copy link
Collaborator

do you think it will throw errors in @jbrowse/img or other nodejs usages since it is only polyfilled under jest? could add the polyfill to the jbrowse-img product

it's tricky to test what @jbrowse/img how it will end up installed for the end-user so I can't easily verify

@garrettjstevens
Copy link
Collaborator Author

Are OAuth tracks intended to be supported with @jbrowse/img? I'm not sure how that would work since there's no UI for entering credentials.

@cmdcolin
Copy link
Collaborator

It is not necessarily intended but perhaps if we really wanted to we could find a way to supply the auth token manually via the command line. Since @jbrowse/img is so deeply intertwined with @jbrowse/react-linear-genome-view and @jbrowse/react-linear-genome-view does not use @jbrowse/plugin-authentication it is probably not a concern for now though

@cmdcolin
Copy link
Collaborator

also note: my concern for mentioning it was more that whenever this code is instantiated, the getRandomValues automatically runs whether or not the oauth is used (which is why there are many console.logs with the error on main)

@cmdcolin
Copy link
Collaborator

can merge this for now :)

@cmdcolin cmdcolin merged commit 55f312c into main Mar 15, 2022
@cmdcolin cmdcolin deleted the polyfill_getRandomValues_in_tests branch March 15, 2022 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OAuth produces console errors during test suite on main
2 participants