Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quick fix for S3415 ('inverted-assertion-arguments') #3046

Merged
merged 4 commits into from
Mar 17, 2022

Conversation

yassin-kammoun-sonarsource
Copy link
Contributor

Fixes #3015

@yassin-kammoun-sonarsource
Copy link
Contributor Author

The newly added test file should be dropped once #3047 is done, and the quick fix assertions should be moved to the comment-based test file.

import { rule } from 'rules/inverted-assertion-arguments';
import { RuleTester } from 'eslint';

const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2018, sourceType: 'module' } });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add comment that this rule is tested in another file and that here we just testing fixes.

const assert = require('chai').should();
describe('suite', () => {
it('test', () => {
should.fail(42, aNumber);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh instead of testing different APIs, I would focus on more complex expressions (multiline, spaces)

@sonarsource-next
Copy link

@vilchik-elena vilchik-elena merged commit c12cea6 into master Mar 17, 2022
@vilchik-elena vilchik-elena deleted the issue-3015 branch March 17, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add quick fix for S3415: Assertion arguments should be passed in the correct order
2 participants