Skip to content

Conversation

@zastrowm
Copy link
Member

@zastrowm zastrowm commented Dec 4, 2025

Description

Rather than special casing the browser, run all integ tests in both browser & node by default, opting out when we need tests to run in only a single environment.

For opting out, we now have two options:

  • For one off tests, use skip: isInBrowser()
  • For entire tests, use the file convention thing.node.test.ts and that will exclude it from browser tests

This refactoring needed a bit of plumbing to make tests accommodate both environments, but I think it worked pretty well

Related Issues

Documentation PR

Type of Change

Refactor

Testing

How have you tested the change?

  • I ran npm run check

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Rather than special casing the browser, run *all* integ tests in both browser & node by default, opting out when we need tests to run in only a single environment.

For opting out, we now have two options:

 - For one off tests, use `skip: isInBrowser()`
 - For entire tests, use the file convention `thing.node.test.ts` and that will exclude it from browser tests

This refactoring needed a bit of plumbing to make tests accommodate both environments, but I think it worked pretty well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant