Skip to content

Commit

Permalink
test: add test for webkit-keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco committed Nov 10, 2023
1 parent 94aabc2 commit 571e7b6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/style.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,32 @@ it('ignores keyframes atrule', () => {
},
});
});

it('ignores @-webkit-keyframes atrule', () => {
const root = parseSvg(`
<svg>
<style>
.a {
animation: loading 4s linear infinite;
}
@-webkit-keyframes loading {
0% {
stroke-dashoffset: 440;
}
50% {
stroke-dashoffset: 0;
}
}
</style>
<rect id="element" class="a" />
</svg>
`);
const stylesheet = collectStylesheet(root);
expect(computeStyle(stylesheet, getElementById(root, 'element'))).toEqual({
animation: {
type: 'static',
inherited: false,
value: 'loading 4s linear infinite',
},
});
});

0 comments on commit 571e7b6

Please sign in to comment.