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

Error: Cannot read property 'text' of undefined #1

Open
bitsnaps opened this issue Apr 17, 2020 · 2 comments
Open

Error: Cannot read property 'text' of undefined #1

bitsnaps opened this issue Apr 17, 2020 · 2 comments
Assignees

Comments

@bitsnaps
Copy link

Hi,
I get an error when testing FlushPromises :

Cannot read property 'text' of undefined

The app is working fine, it runs correctly, I've even added a line to display <MessageDisplay /> in the AppHeader.vue to make sure the json-server is up and running.
The beginning of the log:

    console.error node_modules/vue/dist/vue.runtime.common.dev.js:621
      [Vue warn]: Error in render: "TypeError: Cannot read property 'text' of undefined"

      found in

      ---> <Anonymous>
             <Root>
    console.error node_modules/vue/dist/vue.runtime.common.dev.js:1884
      TypeError: Cannot read property 'text' of undefined
@skoyah
Copy link

skoyah commented May 4, 2020

Same here

@edytajordan
Copy link

Hi. I've added this code after jest.mock() call:
beforeEach(() => { jest.clearAllMocks(); //todo don't forget to clear all mocks before each test! })
and it seemed to clear that error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants