Skip to content

chore: rework msw usage to support more runtimes#151

Open
frederikprijck wants to merge 2 commits into
chore/runtimes-cifrom
chore/runtimes-ci-refactor-tests
Open

chore: rework msw usage to support more runtimes#151
frederikprijck wants to merge 2 commits into
chore/runtimes-cifrom
chore/runtimes-ci-refactor-tests

Conversation

@frederikprijck
Copy link
Copy Markdown
Member

Description

  • Replace msw/node with a custom mock-http.ts fetch-patching implementation across all packages (auth0-auth-js, auth0-server-js, auth0-api-js) so tests run on Bun, Deno, and Cloudflare Workers without Node.js
    HTTP interceptors
    • Add a BroadcastChannel stub polyfill for the Workers runtime, where MSW imports it unconditionally but it is not available as a global
    • Update vitest.config.workers.ts and wrangler.toml in each package to wire up the new test utilities

References

N/A

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@frederikprijck frederikprijck force-pushed the chore/runtimes-ci-refactor-tests branch from 963fb5e to d663b5c Compare March 6, 2026 15:43
branches: [main]
push:
branches: [main]
branches: [main, chore/runtimes-ci-refactor-tests]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to revert these changes prior to merge

@gyaneshgouraw-okta gyaneshgouraw-okta requested a review from a team March 11, 2026 09:54
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