From d8e5bb414e618595abe4e9ad0bf1f058bc58c289 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Mon, 18 Sep 2023 16:06:08 +0100 Subject: [PATCH] test: add check for keyframe selector to --- test/svgo/_index.test.js | 8 ++++++++ test/svgo/keyframe-selectors.svg | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/svgo/keyframe-selectors.svg diff --git a/test/svgo/_index.test.js b/test/svgo/_index.test.js index 99c176da6..f21eb15c6 100644 --- a/test/svgo/_index.test.js +++ b/test/svgo/_index.test.js @@ -61,4 +61,12 @@ describe('svgo', () => { }); expect(normalize(result.data)).toEqual(expected); }); + it('should preserve "to" keyframe selector', async () => { + const [original, expected] = await parseFixture('keyframe-selectors.svg'); + const result = optimize(original, { + path: 'input.svg', + js2svg: { pretty: true }, + }); + expect(normalize(result.data)).toEqual(expected); + }); }); diff --git a/test/svgo/keyframe-selectors.svg b/test/svgo/keyframe-selectors.svg new file mode 100644 index 000000000..4865c3108 --- /dev/null +++ b/test/svgo/keyframe-selectors.svg @@ -0,0 +1,13 @@ + + + + + +@@@ + + + + +