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 tests for ignoring properties case for ordering. Related to #78 #196

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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; }',
Astrael1 marked this conversation as resolved.
Show resolved Hide resolved
},
{
// 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'),
},
{
Astrael1 marked this conversation as resolved.
Show resolved Hide resolved
// 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