You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a unit test with msw's ws support. However I'm running the tests in Bun with Bun's test-runner.
Unfortunately when initialising the msw server I get
# Unhandled error between tests
-------------------------------
1 | (function (entry, fetcher)
^
SyntaxError: Export named 'HTTPParser' not found in module 'http'.
-------------------------------
So clearly this is an area where Bun's node emulation is incomplete.
On the Bun side it was already reported here oven-sh/bun#15535 (closed as unplanned), but again (this time referencing msw) here oven-sh/bun#13072 which is open but it's not clear when/if it will be picked up.
In the meantime, I wonder if there is something that msw could do. Eg perhaps there's a standalone HTTP parser that could be used instead?
For now I might have to switch from Bun to Node test-runner just because of this 😢 unless you can suggest something?
The text was updated successfully, but these errors were encountered:
Scope
Improves an existing behavior
Compatibility
Feature description
I'm trying to write a unit test with msw's ws support. However I'm running the tests in Bun with Bun's test-runner.
Unfortunately when initialising the msw server I get
So clearly this is an area where Bun's node emulation is incomplete.
On the Bun side it was already reported here oven-sh/bun#15535 (closed as unplanned), but again (this time referencing msw) here oven-sh/bun#13072 which is open but it's not clear when/if it will be picked up.
In the meantime, I wonder if there is something that msw could do. Eg perhaps there's a standalone HTTP parser that could be used instead?
For now I might have to switch from Bun to Node test-runner just because of this 😢 unless you can suggest something?
The text was updated successfully, but these errors were encountered: