False negatives when using variable named `fit` (`no-focused-tests` & `no-test-prefixes`)
See original GitHub issueHeya,
I have a module called fit
which is being imported in a non-test file. However, this plugin seems to think that this file has a test in it (because it searches for “it
” ?) and throws two errors:
const { width, height, scale } = fit(
this.props.frameSize, container, { apply: false }
);
I’m guessing this is not supposed to happen, so I wanted to report it.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Karate | Test Automation Made Simple.
Note that the Java class does not need to be public and even the test methods do not ... and then set up...
Read more >Basic Statistical Analysis Using the R Statistical Package - SPH
The attach( ) command. For convenience, the individual variables in a data set can also be named without the dataframename prefix. The 'attach()'...
Read more >lavaan: Latent Variable Analysis
Description Fit a variety of latent variable models, including confirmatory factor analysis, structural equation modeling and latent growth ...
Read more >XSL Transformations (XSLT) Version 3.0 - W3C
Note : The use of the term tree in this document does not imply the use of ... The initial named template is...
Read more >19 Functions | R for Data Science - Hadley Wickham
The focus of this chapter is on writing functions in base R, ... it's a good idea to rewrite the code using temporary...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess part of the problem might also be that it’s looking inside a file that wouldn’t normally be loaded by jest. By default jest seems to only load files ending in
.test.js
,.spec.js
, etc…, so maybe this behaviour can be mirrored?Might not be the ideal solution, but it would probably also lower the probability of errors like this?
Resolved with the new jest function call parsing logic, which requires functions to either be globals or imported from
@jest/globals
.