Skip to content

Warning about overlapping act() calls when using Promise.all / Axios.all #615

@vallq

Description

@vallq
  • @testing-library/react version:
  • react version: 16.13.0
  • node version: v13.5.0
  • npm (or yarn) version: 6.14.1

Relevant code or config:

await Axios.all([
          axios.post("/publish", articleDetails),
          axios.post("/articles", articleDetails)
        ]);

What you did:

Trying to make multiple axios calls (appended with baseURL) using Axios.all causes the following warning message:

What happened:

console.error node_modules/react-dom/cjs/react-dom-test-utils.development.js:87
Warning: You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one.

Problem description:

Working on an external product for a client; would like to get rid of console error warnings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions