Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Mock websocket server for unit tests #758

Closed
2 of 4 tasks
JulienChampagnol opened this issue Feb 14, 2024 · 3 comments
Closed
2 of 4 tasks

Mock websocket server for unit tests #758

JulienChampagnol opened this issue Feb 14, 2024 · 3 comments
Labels
pending triage question Further information is requested

Comments

@JulienChampagnol
Copy link

Describe the feature

The same way registerEndpoint mocks a server endpoint,
is it possible to create an util that mocks a websocket server?

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@danielroe
Copy link
Member

Are you wanting to test Nuxt HMR or are you doing something else with websockets?

@danielroe danielroe added the question Further information is requested label Feb 15, 2024
@JulienChampagnol
Copy link
Author

The goal is to test to mock external features inside of tests

@danielroe
Copy link
Member

So this doesn't really seem like a nuxt/test-utils feature request so much as general testing advice, right? You can of course create a websocket server in a test. But I think I (or anyone else) might need some more info on your app, what you are trying and what isn't working for you.

@nuxt nuxt locked and limited conversation to collaborators Feb 19, 2024
@danielroe danielroe converted this issue into discussion #764 Feb 19, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
pending triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants