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

Proposal: Mocking Centrifuge Client for Testing Without a Server #112

Open
shalom-aviv opened this issue Dec 15, 2024 · 0 comments
Open

Comments

@shalom-aviv
Copy link
Contributor

Description:

I’m exploring the possibility of mocking the Centrifuge client on the client-side for testing purposes, without the need to connect to a server. The goal is to enable developers to write tests using pre-prepared mock data that emulates the behavior of the Centrifuge client as if it were connected to a server.

Currently, this seems challenging with the existing design. I’d like to understand:

  1. Existing Capabilities:
    • Is there already a way to achieve this with the current version of the library?
  2. Future Plans:
    • Are there any plans or a roadmap for enabling such functionality?
  3. Consideration for Design Changes:
    • Would you be open to considering potential design changes to support mocking?
    • For example, allowing a “stub client” to be substituted for the real Centrifuge client, which could return pre-defined responses based on mock data.

This feature would be extremely valuable for writing unit tests, as it would eliminate the dependency on a live server, reduce test flakiness, and speed up the testing process.

I’d love to hear your thoughts on this. Do you think this is feasible within the scope of the library? If not currently feasible, would you consider it for future releases?

Thank you for all the work you’ve put into Centrifuge! It’s been a great tool, and adding this capability could make it even more versatile for testing scenarios.

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

No branches or pull requests

1 participant