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

Server fn mocks #3418

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

EugenEistrach
Copy link

@EugenEistrach EugenEistrach commented Feb 13, 2025

add basic mock functionality for client. we can execute this somewhere in our code to change the function to be mocked, e.g.:

  console.log('Default mock!')
  return { message: 'Hello from default mock!' }
})

not sure if this is suitable or we need some other approach.
also might need to think if this should be controlled by some flag or whatever..

also have create this package that does allow mock in userland without having to add the mock logic to the server functions themself https://www.npmjs.com/package/tanstack-mock-server-fn

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

Successfully merging this pull request may close these issues.

1 participant