valantic/spartacus-mock

New Features with MSW 2.0

Opened this issue · 1 comments

Check the following new features with MSW 2.0:

  1. worker.start option quiet: true to disable all logging, https://mswjs.io/docs/api/setup-worker/start#quiet => #62
  2. scenarios to test success & error case, https://mswjs.io/docs/best-practices/dynamic-mock-scenarios
  3. check if network behavior overrides can / should be used, https://mswjs.io/docs/best-practices/network-behavior-overrides
  4. check if mock sync methods should be used, https://mswjs.io/docs/recipes/keeping-mocks-in-sync
  5. check if conditional import can be improved, https://mswjs.io/docs/integrations/browser#conditionally-enable-mocking => done
  1. worker.start option quiet: true to disable all logging, https://mswjs.io/docs/api/setup-worker/start#quiet =>
    => done in ticket #62
  2. scenarios to test success & error case, https://mswjs.io/docs/best-practices/dynamic-mock-scenarios
  3. check if network behavior overrides can / should be used, https://mswjs.io/docs/best-practices/network-behavior-overrides
  4. check if mock sync methods should be used, https://mswjs.io/docs/recipes/keeping-mocks-in-sync
    => done, auto generation by using https://github.com/zoubingwu/msw-auto-mock and swagger openapi json works, but starting the server leads in an endless loop
    => npx msw-auto-mock ./swagger.json --base-url https://swagger-url.com/ -o ./src/mock-server/mock.js
  5. check if conditional import can be improved, https://mswjs.io/docs/integrations/browser#conditionally-enable-mocking
    => done