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
Bolt icons testing #1102
Bolt icons testing #1102
Conversation
… icons to be rendered by icon t
…ithub.com/bolt-design-system/bolt into feature/bolt-icons-testing
refs: BDS-952
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.
@adamszalapski all tests passed, but I saw this error:
Error: ENOENT: no such file or directory, open '/Users/morsd/sites/bolt/packages/components/bolt-icons/src/icons/yeti.js'
It's looking for the icon in "src" not "__tests__". Is this expected?
Thanks, @danielamorse is expected behavior. After compiling icons we remove the icon that was created only for these tests. Please check if you have this three task before all tests. |
@adamszalapski yep, those three tasks run. It would be better not to get this error, as it makes me think that something is broken when I run the tests. If it's not too much work, can we try to fix? I also noticed:
Ideally, git status would be clean after running |
…g configuration and fix issue w
…ponents-button,@bolt/components
@danielamorse and @sghoweri all issues that you guys raised should be fixed. Please try to check this PR one more time. |
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.
@adamszalapski Tested again and now git is clean after running npm run test:js
. I also reviewed the code updates. Nice work!
I have one remaining issue, but maybe it's a non-issue. When I first ran the tests they passed, but with errors on every icon, like this:
ERROR in ./packages/components/bolt-icons/src/index.js
Module not found: Error: Can't resolve './icons/youtube-solid' in '/Users/morsd/sites/bolt/packages/components/bolt-icons/src'
@ ./packages/components/bolt-icons/src/index.js 116:0-38 116:0-38
Then I ran chmod 777 -R
on the icons folder and it ran without any errors. Did you ever have this issue? Is there anything we can/should do about it? Approving the PR 👍 , just wanted to point out that issue.
@danielamorse, in my opinion, is not related to |
@adamszalapski ah, you are correct. I ran it again and the issue re-appeared. |
…o be run after all the tests
Hi @danielamorse my assumptions were wrong. The problem is not that js don't know when files are fully saved but |
const config = await getConfig(); | ||
|
||
config.iconDir = config.iconDir.filter( | ||
item => !item.includes('test/jest-test-svgs'), |
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.
Ideally these assets would live with the icon task or test for the icons themselves BUT I'm ok with this as is (we can always iterate) 👍
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.
Looking great - awesome work @adamszalapski! 🎉
Jira
http://vjira2:8080/browse/BDS-952
Summary
Write tests and updating configuration of jest tests
Details
(Explain the changes in enough detail fo reviewers to understand. Raise any questions for reviewers to consider.)
How to test
Run this code locally and check if all jest test are passing:
npm run test:js