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.

This `test/src/rules/extensions.js` test should be failing with 2 errors not 1

See original GitHub issue

This invalid test should fail with 2 errors – 1 for .js and another for .jsx.

https://github.com/benmosher/eslint-plugin-import/blob/a5844d57be0c3757248c7b824e4cc9c2c844db33/tests/src/rules/extensions.js#L129-L144

The error that I believe is missing:

{
    message: 'Unexpected use of file extension "jsx" for "./bar.jsx"',
    line: 2,
    column: 22,
},

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ljharbcommented, Oct 31, 2017

We should probably audit all of the tests for this rule to see where the problem is.

0reactions
ljharbcommented, Feb 2, 2018

Sounds like we might want to add more test cases, but everything’s correct as-is?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mocha tests not failing when they should - Stack Overflow
I'm using a MEAN stack, and I tried to test the node files with jasmine, since I'm already using that to test the...
Read more >
Need help, code seems right but still getting error when i test ...
Ran all test suites matching /user-report/i. ... Jest did not exit one second after the test run has completed. This usually means that...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
Should.js API Documentation
It should accept 2 arguments: should function and Assertion constructor ... on execution of sequenced assertion to do not check all , but...
Read more >
GitHub - tj/should.js: BDD style assertions for node.js
BDD style assertions for node.js -- test framework agnostic - GitHub ... Error (to check if it is error) or should(value).not.ok (to check...
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