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

msw compiled with warnings after installing and configuring according to the documentation #1086

Closed
Dwipasca opened this issue Feb 1, 2022 · 2 comments · Fixed by #1095
Closed
Labels
bug Something isn't working

Comments

@Dwipasca
Copy link

Dwipasca commented Feb 1, 2022

Describe the bug

I have followed the installation method of MSW to React with the instruction documentation, Indeed my expectations are in accordance with the documentation, but when I looking at my terminal it's say compiled with warnings, and after I checked the response it's 304 and the fake data not showing.

Environment

  • msw: 0.36.8
  • nodejs: 17.4.0
  • npm: 8.3.1

Please also provide your browser version.

  • firefox: 96

To Reproduce

Steps to reproduce the behavior:

  1. Perform the installation according to the documentation : https://mswjs.io/docs/getting-started/install
  2. But change code in handlers.js, for example:
const coins = [
  { name: "Cardano", website: "https://cardano.org" },
  { name: "Polkadot", website: "https://polkadot.network" },
];

export const handlers = [
  rest.get("/coins", (req, res, ctx) => {
    return res(
      ctx.status(200),
      ctx.delay(500),
      ctx.json(
        coins.map((data) => {
          return [...data];
        })
      )
    );
  }),
];
  1. Run the app yarn start

or you can see this repo : https://github.com/Dwipasca/MSW-compiled-with-warnings-BUG

Expected behavior

Don't have any error or warning in terminal, and show the fake data if we hit the api.

Screenshots

Screen Shot 2022-02-01 at 10 38 26
Screen Shot 2022-02-01 at 12 19 12
Screen Shot 2022-02-01 at 12 19 47

@Dwipasca Dwipasca added the bug Something isn't working label Feb 1, 2022
@kettanaito
Copy link
Member

Hi, @Dwipasca. Thanks for reporting this. The issue is known and we are tracking it in #1030. You can follow the status update there. Feel free to contribute as well, it's a matter of publishing the source of one of the dependencies to npm.

@github-actions
Copy link

🎉 This issue has been resolved in version 0.38.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants