-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore: add browser testing to fuel-gauge
#2319
Conversation
{ | ||
stdio: 'pipe', | ||
if (process.env.VITEST && process.env.VITEST_ENV !== 'browser') { | ||
const { spawn } = await import('child_process'); |
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.
Does this mean that tests running in the browser won't need a polyfill for this this import? If so, cool stuff!
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.
It sure does!
…/FuelLabs/fuels-ts into db/chore/fuel-gauge-browser-test
…/chore/fuel-gauge-browser-test
Superseded by work in #2378 |
Closes #284
Builds on #2123 to utilise typegen in tests, meaning we require less polyfilled/reimplemented functionality.
child_process
can't be polyfilled, so I am now dynamically importing it in a non-browser environment. This has made version related functionalityasync
. This is likely to not be a problem ifaccount
was tree-shakeable.