Skip to content

Fix space-within-parens with option 0 #332

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

Merged
merged 2 commits into from
Feb 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add test for space-within-parens with option 0
  • Loading branch information
MatthiasKunnen committed Feb 13, 2020
commit 16cbb14fb6be68dc3bd3c6c620b1bab647583efd
15 changes: 15 additions & 0 deletions src/rules/converters/tests/space-within-parens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ describe(convertSpaceWithinParens, () => {
});
});

test("conversion with 0 spaces required", () => {
const result = convertSpaceWithinParens({
ruleArguments: [0],
});

expect(result).toEqual({
rules: [
{
ruleArguments: ["never"],
ruleName: "space-in-parens",
},
],
});
});

test("conversion with min spaces arguement", () => {
const result = convertSpaceWithinParens({
ruleArguments: [5],
Expand Down