-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby-plugin-manifest): allow multiple icon paths #13059
Conversation
…king on multiple icon paths
cbe3fef
to
c7ea1d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a few tests validating this fix?
Also - I'm not sure exactly how this fixes include_favicon?
Thanks!
This used to fix include_favicon, however it was fixed in master so my fix got removed when I rebased. |
Co-Authored-By: me4502 <mnmiller1@me.com>
path.dirname(`other-icons/icon-48x48.png`) | ||
) | ||
|
||
const calls = fs.mkdirSync.mock.calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const calls = fs.mkdirSync.mock.calls | |
expect(fs.mkdirSync).toHaveBeenNthCalledWith(1, firstIconPath) | |
expect(fs.mkdirSync).toHaveBeenNthCalledWith(2, secondIconPath) |
I haven't tested this--but just a suggestion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it like that originally, however I modified it to use calls to be inline with the other tests in the file. I can change it back if you'd like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@me4502 My 2 cents: calls are probably the less clean way to do this (I wrote some of these tests...I just didn't no this other option existed). This seems much cleaner and robust. Do as you wish imo. Another PR to clean up all the tests is welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it'd make more sense to clean up all tests in a single PR, I can do that instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a fair response to continue with what was in the test/file to begin with--so don't want to dissuade from that behavior.
Let's revisit this in a future PR! For now: 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️ I have no preference. See if @DSchau does. My guess is he won't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dustin's suggestion on cleaning up expect is good. otherwise this looks great. Thanks for the PR.
Thanks, I'll write another PR to cleanup the tests shortly. |
Successfully published:
|
## Description gatsby-plugin-manifest fails to create images when paths are different. ~~gatsby-plugin-manifest does not delete the include_favicon option when creating the manifest file.~~ ## Related Issues Fixes gatsbyjs#13055
## Description Cleaning up a few of the manifest tests, as mentioned in gatsbyjs#13059 ## Related Issues gatsbyjs#13059
Description
gatsby-plugin-manifest fails to create images when paths are different.
gatsby-plugin-manifest does not delete the include_favicon option when creating the manifest file.Related Issues
Fixes #13055