Skip to content

[STEP-9] TypeError: MutationObserver is not a constructor #1

@rubenslopes

Description

@rubenslopes

I've tried to update outdated packages but it does not solved the problem

LOG

FAIL  src/tests/app.js
  ✕ it shows a message when there are no reminders (67ms)

  ● it shows a message when there are no reminders

    TypeError: MutationObserver is not a constructor

      12 |     visit("/")
    > 13 |     await waitForElementToBeRemoved(() => screen.getByText("Loading..."))
         |           ^
      14 | 
      15 |     expect(screen.getByText("All done!")).toBeInTheDocument()
      16 |   })

      at node_modules/@testing-library/dom/dist/wait-for.js:79:18
      at waitFor (node_modules/@testing-library/dom/dist/wait-for.js:42:10)
      at node_modules/@testing-library/dom/dist/wait-for.js:135:54
      at node_modules/@testing-library/react/dist/pure.js:58:22
      at node_modules/@testing-library/react/dist/act-compat.js:60:24
      at batchedUpdates$1 (node_modules/react-dom/cjs/react-dom.development.js:21856:12)
      at act (node_modules/react-dom/cjs/react-dom-test-utils.development.js:929:14)
      at node_modules/@testing-library/react/dist/act-compat.js:59:20
      at asyncAct (node_modules/@testing-library/react/dist/act-compat.js:38:14)
      at Object.asyncWrapper (node_modules/@testing-library/react/dist/pure.js:57:35)
      at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:135:35)
      at waitForElementToBeRemoved (node_modules/@testing-library/dom/dist/wait-for-element-to-be-removed.js:39:31)
      at Object.<anonymous> (src/tests/app.js:13:11)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        1.8s, estimated 2s
Ran all test suites.

Watch Usage: Press w to show more.

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