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.

TypeError: options.sourcesRelatedToTestsInChangedFiles.has is not a function

See original GitHub issue

🐛 Bug Report

After upgrading to 25.5.0, started seeing an error in Watch mode.

To Reproduce

Run jest as jest --watch, then update some test files. Sample error output:

    TypeError: options.sourcesRelatedToTestsInChangedFiles.has is not a function

      1 | import awsMock from 'aws-sdk-mock';
    > 2 | import {
        | ^
      3 |   asyncWrapper,
      4 |   getEnv,
      5 |   getS3Data,

      at shouldInstrument (node_modules/@jest/transform/build/shouldInstrument.js:191:54)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:614:39)
      at Object.<anonymous> (test/lib/common.test.js:2:1)

envinfo

  System:
    OS: macOS 10.15.4
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.13.0/bin/npm
  npmPackages:
    jest: ^25.5.0 => 25.5.0 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
SimenBcommented, Apr 29, 2020

Fixed in 25.5.1

1reaction
denchencommented, Apr 28, 2020

Yeah, seems like it. If I set collectCoverage: false (I was using lcov), then the errors go away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: options is not a function - Stack Overflow
This has nothing to do with updating Firestore. options is an array, but you're calling it like a function here using parenthesis:
Read more >
@jest/transform@29.3.1 - jsDocs.io
Indicates if the transformer is capable of instrumenting the code for code coverage. If V8 coverage is _not_ active, and this is true ......
Read more >
How to solve the "is not a function" error in JavaScript
js we use require() to load external modules and files. This can cause, in some cases, an error like this: TypeError: require(...) is...
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >
How to fix "Uncaught TypeError: x is not a function" in JavaScript
JS Casts 01 - How to fix "Uncaught TypeError : x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/01 for a summary ...
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