From 280aed954db0941002cce8a245b6b43df4101e8c Mon Sep 17 00:00:00 2001 From: strarsis Date: Mon, 9 Mar 2020 15:56:39 +0100 Subject: [PATCH] Add test for specific config set for prefixIds with multipass. --- test/coa/_index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/coa/_index.js b/test/coa/_index.js index 0f17d9cc3..adfa53e64 100644 --- a/test/coa/_index.js +++ b/test/coa/_index.js @@ -217,6 +217,22 @@ describe('coa', function() { }, error => done(error)); }); + it('should work correctly with some specific options', function(done) { + svgo({ + input: mpSvgInPath, + output: 'temp.svg', + quiet: true, + multipass: true, + config: '{ "plugins": [ { "prefixIds": { "delim": "_" } }, { "cleanupIDs": { "minify": true } } ] }', + }).then(function() { + const mpSvgOut = fs.readFileSync('temp.svg', 'utf8'); + + done(/in_svg_/.test(mpSvgOut) ? null : 'prefixIds plugin doesn\'t work correctly with some specific options.'); + + fse.removeSync('temp.svg'); + }, error => done(error)); + }); + it('should allow addAttributesToSVGElement plugin to correctly handle subsequent passes with multipass enabled', function(done) { svgo({ input: mpSvgInPath,