-
-
Notifications
You must be signed in to change notification settings - Fork 32
fix: toString should stringify node #74
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
Conversation
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.
LGTM
@jonathantneal @jwilsson went back over the PR today and found that the tests for toString() weren't actually testing the node's toString - a copy/pasted typo was just checking a string against it's own toString.
That led me to refactor quite a bit, and revealed several subsequent shortcomings, all of which should now be fixed. I've improved the tests and coverage to guard against what I found moving forward. Please review again.
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 left one question, but it is non-blocking. Looks good!
This PR contains:
Breaking Changes?
If yes, please describe the breakage.
Please Describe Your Changes
Fixes #72. Using
toStringorString(node)is failing due to the base PostCSS stringifier not being able to recognize our node types.This isn't as elegant as I'd like, and does involve some code duplication that I'm not a fan of, but it gets the job done for the time being.