question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Cannot read property 'bind' of undefined

See original GitHub issue

Version

27.4.5

Steps to reproduce

Just run a simple test with nothing in it:

test("a", () => {
})

Expected behavior

Not getting this error, and the test should work.

Actual behavior

 FAIL  tests/jest/integration/promoCodeTemplateEditor.spec.js
  ● Test suite failed to run

    TypeError: Cannot read property 'bind' of undefined

      at Runtime._createJestObjectFor (node_modules/@jest/core/node_modules/jest-runtime/build/index.js:2193:46)
      at async TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
Capture d’écran 2021-12-22 à 18 02 06

Additional context

The error doesn’t show up on 26.6.3. I’ll use this version until the bug is fixed.

Probably related issue: https://github.com/facebook/jest/issues/11720

Environment

MacOS Big Sur v11.4
node v14.17.0
npm 6.14.13
jest 27.4.5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:12
  • Comments:12

github_iconTop GitHub Comments

5reactions
SimenBcommented, Jan 5, 2022

Yeah, fixed by #12213

0reactions
github-actions[bot]commented, Feb 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'bind' of undefined React when all ...
Then the issue is with doing .bind on selectNumber . selectNumber is either undefined when the component is initialized (i.e. there isn't a...
Read more >
TypeError: Cannot read property 'bind' of undefined - Odoo
This solution was very helpful to me, thank you. ... This error gets solved when I deleted all my cookies and created a...
Read more >
Scheduler - The 'Cannot read property 'bind' of undefined ...
I found that the error occurs because the groups option is changed in the onOptionChanged event handler. We need additional time to research ......
Read more >
IonicServerModule: Cannot read property 'bind' of undefined
I have found that the problem is with $stencilWindow.fetch which is undefined so when you comment this line: function hydrateFactory($ ...
Read more >
TypeError: Cannot read property 'bind' of undefined - Reddit
Problem 1: You bound non-existent handleChange and handleSubmit methods to the class without defining either method. Problem 2: Without defining ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found