Closed sonicparke closed 3 years ago
Hey @sonicparke I don't work with Angular so I read some blogs and the official MSW example to get some info. From that, it looks like you're doing everything right.
Can you tell me what's the purpose of this snippet in the story file?
moduleMetadata: {
imports: [HttpClientModule],
},
Another thing you can try is to clone the below repo and try to use the same handler, config in your example. https://github.com/mswjs/examples/tree/master/examples/rest-angular
It would let me know if something is wrong with my addon or is it a different problem.
Also if you could create a reproduction repo with your storybook config that would be really great.
Closed due to inactivity. Feel free to re-open it.
Is there any reason this wouldn't work with Angular? It seems like it's not actually intercepting my requests.
It looks like it should've worked but it's returned the data from the actual endpoint and not what I've mocked:
According to the console MSW is enabled
Here is my story where I'm adding the params:
preview.js
angular.json
Am I missing something?