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 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:
Existing Capabilities:
• Is there already a way to achieve this with the current version of the library?
Future Plans:
• Are there any plans or a roadmap for enabling such functionality?
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.
The text was updated successfully, but these errors were encountered:
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:
• Is there already a way to achieve this with the current version of the library?
• Are there any plans or a roadmap for enabling such functionality?
• 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.
The text was updated successfully, but these errors were encountered: