Skip to content

Commit

Permalink
Add tests for fixed edge cases (#1059)
Browse files Browse the repository at this point in the history
* test(postcss-merge-longhand): check invalid border property handling

* test(postcss-convert-values): add test case for #958

Co-authored-by: Shipov Mikhail <mshipov@yandex.ru>
  • Loading branch information
ludofischer and SkReD committed Apr 28, 2021
1 parent a2245fc commit e64272f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/postcss-convert-values/src/__tests__/index.js
Expand Up @@ -382,6 +382,26 @@ test(
passthroughCSS('h1{top:0\\9\\0;left:0lightyear}')
);

test(
'should not try to convert keyframe names in animation',
passthroughCSS(
'h1{ -webkit-animation: e836684w2 } h2{ animation: e836684w2 }'
)
);

test(
'should not try to convert keyframe names in animation (case 2)',
passthroughCSS(
`
.e4yw0Q {
animation: e4yw0Q;
}
@keyframes e4yw0Q {}
`
)
);

['stroke-dasharray', 'stroke-dashoffset', 'stroke-width'].forEach(
(property) => {
test(
Expand Down
7 changes: 7 additions & 0 deletions packages/postcss-merge-longhand/src/__tests__/borders.js
Expand Up @@ -1203,6 +1203,13 @@ test(
)
);

test(
'should not break border rules mixing custorm and regular properties',
passthroughCSS(
'h1{border:var(--v1) solid var(--v2, #abc123);border-right-color:blue}'
)
);

test(
'should overwrite some border-width props and save fallbacks and preserve case #648 2',
processCSS(
Expand Down

0 comments on commit e64272f

Please sign in to comment.