Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Mock network #1

Open
edimitchel opened this issue Aug 17, 2021 · 6 comments
Open

Mock network #1

edimitchel opened this issue Aug 17, 2021 · 6 comments
Labels
comp:runner enhancement New feature or request
Projects

Comments

@edimitchel
Copy link
Contributor

Hi peeky 馃惐 !

Is it possible to catch and mock natively mousy http requests for component testing ?

@Akryum
Copy link
Owner

Akryum commented Aug 17, 2021

What do you mean by "mousy http requests"?

@edimitchel
Copy link
Contributor Author

edimitchel commented Aug 17, 2021

It's a joke. 馃樇馃徆馃惌
I mean to be able to stub http request. And what could be awesome, to be a proxy for the first time and request the back end server, and save the response. Then, on rerun, what is return is the snapshot of the preceding request, and so, the test is runnable in CICD using real data.

@Akryum
Copy link
Owner

Akryum commented Aug 17, 2021

馃樄

@Akryum Akryum added the enhancement New feature or request label Aug 22, 2021
@Akryum Akryum added this to To do in v1.0 Aug 23, 2021
@Akryum Akryum changed the title XHR interceptor Mock network Aug 23, 2021
@edimitchel
Copy link
Contributor Author

An inspiration for network mocking : https://github.com/BedrockStreaming/superagent-mock

@edimitchel
Copy link
Contributor Author

Also a great solution: https://github.com/nock/nock

@ericchernuka
Copy link

Leveraging https://mswjs.io/ might make it easy for node and browser environments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
comp:runner enhancement New feature or request
Projects
v1.0
  
To do
Development

No branches or pull requests

3 participants