Skip to content

Commit

Permalink
stylelintGH-4917 Add test cases as separate rule w/scss syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
agarzola committed Nov 20, 2020
1 parent 6e9bbc8 commit 45d29c8
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions lib/rules/at-rule-empty-line-before/__tests__/index.js
Expand Up @@ -278,16 +278,6 @@ testRule({
code: '/* foo */\r\n\r\n@media {}',
description: 'CRLF',
},
{
code: '// foo\n// bar\n@media {}',
},
{
code: '// foo\n// bar\n\n@media{}',
},
{
code: '// foo\r\n// bar\r\n\r\n@media {}',
description: 'CRLF',
},
],

reject: [
Expand All @@ -307,6 +297,26 @@ testRule({
],
});

testRule({
ruleName,
config: ['always', { ignore: ['after-comment'] }],
syntax: 'scss',
fix: true,

accept: [
{
code: '// foo\n// bar\n@media {}',
},
{
code: '// foo\n// bar\n\n@media{}',
},
{
code: '// foo\r\n// bar\r\n\r\n@media {}',
description: 'CRLF',
},
],
});

testRule({
ruleName,
config: ['always', { ignore: ['first-nested'] }],
Expand Down

0 comments on commit 45d29c8

Please sign in to comment.