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

Callback not being executed in server.boundary with jest and react testing library #2366

Open
4 tasks done
kmmccafferty96 opened this issue Nov 20, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working needs:triage Issues that have not been investigated yet. scope:node Related to MSW running in Node

Comments

@kmmccafferty96
Copy link

Prerequisites

Environment check

  • I'm using the latest msw version
  • I'm using Node.js version 18 or higher

Node.js version

v20.12.1

Reproduction repository

https://github.com/kmmccafferty96/msw-server-boundary-issue-reproduction

Reproduction steps

  1. Run npm install
  2. Run npm test

Note that both tests pass even though the second should not. Also to note, the first writes to the console but the second does not.

Current behavior

When using jest with react-testing-library, the callback supplied to server.boundary() is seemingly not executed and tests pass no matter what.

Expected behavior

The callback should be executed and tests should be ran properly.

@kmmccafferty96 kmmccafferty96 added bug Something isn't working needs:triage Issues that have not been investigated yet. scope:node Related to MSW running in Node labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage Issues that have not been investigated yet. scope:node Related to MSW running in Node
Projects
None yet
Development

No branches or pull requests

1 participant