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.

RuleTester should throw if test has output but rule is new-style and lacks meta.fixable property

See original GitHub issue

As discussed in the chat, it’s pretty easy to forget to add meta.fixable to a new-style rule and then the unit tests simply won’t run auto-fix.

It might be worthwhile to add an assertion to RuleTester. If the test has output property and the rule has meta but does not have meta.fixable set to code or whitespace, an assertion failure should be thrown here so that the developer knows that meta.fixable needs to be set on the rule.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vitorbalcommented, Apr 26, 2016

I’d like to work on this one if it gets accepted 😃

0reactions
vitorbalcommented, May 2, 2016

@nzakas @ilyavolodin please let me know if this is what you had in mind: #6043

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing custom TypeScript Eslint rules with unit tests for ...
After reading this article you will know how to create a custom Eslint rule in Typescript for Angular project and how to test...
Read more >
Multiple assertions per test may actually be OK - Corey Cleary
But testing each property one by one may be valid if you have a function that returns an object where you don't care...
Read more >
Changelog — StackStorm 3.8.0 documentation
This command will first try to find a matching alias (same as st2 action-alias match command) and if a match is found, trigger...
Read more >
AssertionError on RuleTester for ESlint rule - Stack Overflow
I have written a custom ESLint rule for a NodeJS application. The rule works as expected. However, I am facing issue running Unit...
Read more >
Advanced googletest Topics
GoogleTest - Google Testing and Mocking Framework. ... Therefore, sometimes a user has to use EXPECT_TRUE() to check a complex expression, for lack...
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