-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 multipass tests #1177
Add multipass tests #1177
Conversation
With this approach, the first pass has multipassCount as |
@dphil: I added the |
6c9bfc3
to
70c8a33
Compare
@kylemh: I got an email notification from GitHub with a comment from you about the |
I was hasty and incorrect. It had to do with the difference of build-time implementation in one file versus the run-time CLI usage again source files in their individual locations. |
@kylemh: Well, it never hurts to have some more tests. |
I’ll appreciate it in my fork when I steal it 😂 |
Fix multipassCounter code to make failed multipass tests pass.
Improve multipass related tests.
cleanupIDs plugin is disabled when a script or style tag is present. I assume that this is because they might contain an id. If these tags are empty there is no point in not cleaning the id though. When running svgo with the option `multipass: true`, it allows us to first run `inlineStyles` plugin to empty the style tag. Then, we can run `cleanupIDs` plugin.
280aed9
to
b43238b
Compare
Hi @strarsis Could you please rebase? |
Glad you got added to the team @TrySound |
@GreLI:
multipass
insvgo
. Currently, there aren't any tests formultipass
at all.multipassCount
that was uncovered with these newly added multipass tests.prefixIds
plugin withmultipass
is added.prefixIds
plugin is added (it is very similar to the test forprefixIds
withmultipass
, so it seems to be a nice addition).addAttributesToSVGElement
plugin withmultipass
is added.@GreLI: Additional points:
multipass
tests I noticed that it doesn't seem to be possible to use aplugins
property for the object passed tosvgo()
, it is simply ignored.enable
can't be used for plugins that require extra configuration, like theaddAttributesToSVGElement
plugin, so I had to pass a raw config string (see https://github.com/svg/svgo/pull/1177/files#diff-58d889243ada560f65a0a1826461d5deR228).prefixIds
plugin related tests, I disabled all other the plugins. But asplugins
key seems to be ignored, I had to pass theplugins
fromsvgo
defaults
todisable
(see https://github.com/svg/svgo/pull/1177/files#diff-58d889243ada560f65a0a1826461d5deR177).Edit: What about using a separate
tests
folder for the plugin tests withmultipass
enabled?