Skip to content

Commit

Permalink
Add tests for ignoring properties case for ordering. Related to #78 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Astrael1 authored Oct 9, 2024
1 parent 416d00c commit 2453a16
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
46 changes: 46 additions & 0 deletions rules/properties-alphabetical-order/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,31 @@ testRule({
{
code: 'a { font-size: 1px; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialised; font-weight: bold; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { display: block; margin: 0 auto 5px 0; Margin: 0 auto 5px 0; width: auto; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { display: block; Margin: 0 auto 5px 0; margin: 0 auto 5px 0; width: auto; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { align: center; Border-width: 1px; Border-top-width: 2px; color: red; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { align: center; border-width: 1px; Border-top-width: 2px; color: red; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { align: center; Border-width: 1px; border-top-width: 2px; color: red; }',
},
],

reject: [
Expand Down Expand Up @@ -131,6 +156,27 @@ testRule({
fixed: '@media print { color: red; top: 0; }',
message: messages.expected('color', 'top'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { align: center; Border-top-width: 2px; Border-width: 1px; color: red; }',
fixed: 'a { align: center; Border-width: 1px; Border-top-width: 2px; color: red; }',
message: messages.expected('Border-width', 'Border-top-width'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { align: center; Border-top-width: 2px; border-width: 1px; color: red; }',
fixed: 'a { align: center; border-width: 1px; Border-top-width: 2px; color: red; }',
message: messages.expected('border-width', 'Border-top-width'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { align: center; border-top-width: 2px; Border-width: 1px; color: red; }',
fixed: 'a { align: center; Border-width: 1px; border-top-width: 2px; color: red; }',
message: messages.expected('Border-width', 'border-top-width'),
},
],
});

Expand Down
24 changes: 24 additions & 0 deletions rules/properties-order/tests/flat.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ testRule({
{
code: 'a { top: 0; color: pink; display: none; width: 0; height: 0; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { top: 0; Top: 0; color: pink; }',
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { Top: 0; top: 0; color: pink; }',
},
],

reject: [
Expand All @@ -56,6 +66,20 @@ testRule({
fixed: 'a { top: 0; color: pink; }',
message: messages.expected('top', 'color'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { Color: pink; top: 0; }',
fixed: 'a { top: 0; Color: pink; }',
message: messages.expected('top', 'Color'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/78
skip: true,
code: 'a { Top: 0; color: pink; top: 0; }',
fixed: 'a { Top: 0; top: 0; color: pink; }',
message: messages.expected('top', 'color'),
},
{
code: 'a { top: 0; transform: scale(1); color: pink; }',
fixed: 'a { transform: scale(1); top: 0; color: pink; }',
Expand Down

0 comments on commit 2453a16

Please sign in to comment.