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.

The arrow function have the parameter cannot be covered

See original GitHub issue

export const testConst = ({ test }) => test; ({ test }) => test; Statement not covered

() => function(this).querySelector('[data-test-name="dataTestName"]') #querySelector('[data-test-name="dataTestName"]') Statement not covered

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
lukescottcommented, Jan 3, 2018

From the linked issue it seems to be only happening with Babel 7. Babel 6 worked correctly. I’m observing this as well with my .map arrow funcs in my React render methods.

0reactions
coreyfarrellcommented, Nov 29, 2020

If your tests never call an arrow function then it is not covered, being reported as such is correct.

I’m closing this issue as it is old and does not provide enough information to troubleshoot. To look deeper we would need a minimal repository demonstrating the issue. Preferably with no other transformations included to rule out compatibility issues with other transformations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Anomalies in JavaScript arrow functions - LogRocket Blog
Arrow functions do not have an arguments binding. However, they have access to the arguments object of the closest non-arrow parent function.
Read more >
Official information on `arguments` in ES6 Arrow functions?
Arrow functions do not have an own arguments binding in their scope; no arguments object is created when calling them.
Read more >
Arrow function expressions - JavaScript - MDN Web Docs
Arrow functions don't have their own bindings to this , arguments , or super , and should not be used as methods. ·...
Read more >
13. Arrow functions - Exploring JS
Arrow functions bind very loosely; 13.5.2. No line break after arrow function parameters; 13.5.3. You can't use statements as expression bodies; 13.5.4.
Read more >
Getting Started with Arrow Functions in JavaScript
The arrow function has a few limitations: you cannot use it as a method on an object, constructor, or generator function. Arrow functions...
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