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

Why not MSW? #9627

Closed
NullVoxPopuli opened this issue Dec 27, 2024 · 2 comments
Closed

Why not MSW? #9627

NullVoxPopuli opened this issue Dec 27, 2024 · 2 comments

Comments

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Dec 27, 2024

MSW, for reference: https://mswjs.io/

Reason I bring this up, is that, while some of the ember-data mocking community has been using Mirage, and Mirage is an absolutely horrendous experience, MSW (while not having a well formed data-mocking library), it provides a much needed benefit in DX, debuggability, and ease of understanding when it comes to figuring out what went wrong with your network requests.

I could see a plugin/library that hooks in to MSW that understand ember-data/warp-drive and provides better mocking than mirage, which brings us to:

There are mentions of "holodeck", which is described under mocking here (snippet from the above issue)

Nice To Have

    Mocking
        Ship stable of @warp-drive/holodeck
            Make it easy to toggle recording for the entire test-suite
            Integrate recording toggle to testem and diagnostic options
            Add docs for testem config
            fix shutdown bug
        http/3 ? (if Bun lands support)
        Provide utils and docs around how to functionally compose mock data
        for holodeck
        API Route Mocking

None of this is inherently incompatible with MSW, afaik.

Now, in discord, there have been mentions of warp-drive creating its own mocking tool, its own server, etc.
And, there is a lot that goes in to that -- it's why MSW has tons of time and effort put in, as has other mocking utilities.

I have a concern, that we don't have enough resources to compete with MSW -- and I'd like to understand (or rather, have stated publicly), what tradeoffs are being considered for warp-drive's mocking and testing tools, if there is anything the warp-drive project inherently doesn't not vibe with when it comes to MSW, etc. MSW used to be buggy -- I think they've fixed all that (for the small things that I've used for -- and maybe other community members could provide their success with MSW (such as 3x speed improvement over using just mirage), etc.

I think we can accelerate be building on existing tools 🎉
(and mostly, I hope that this issue can be a reference (in part, because I keep forgetting the details))

@runspired
Copy link
Contributor

MSW doesn't offer half of what holodeck already offers, and never can. Kinda simple as that. Also what it does is vastly over-complicated due to its approach to interception.

@NullVoxPopuli
Copy link
Contributor Author

It would be good to outline what those specific offerings are

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants