- 
                Notifications
    You must be signed in to change notification settings 
- Fork 411
import parse directly from css #415
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
- This will avoid having to access `fs` which will break in browser environments
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.
Good thinking, thanks for the contribution!
| Codecov Report
 @@            Coverage Diff            @@
##              main      #415   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines          620       620           
  Branches       227       227           
=========================================
  Hits           620       620           
 Continue to review full report at Codecov. 
 | 
| @all-contributors add @yannbf for code | 
| I've put up a pull request to add @yannbf! 🎉 | 
| 🎉 This PR is included in version 5.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 | 
| Looks Identical to: testing-library/jasmine-dom#8 - which was the change for Jasmine - so seems good! 👍 thanks for the @ :) | 
Hey everyone! Thanks for this incredible library 🌈
What:
At Storybook we are developing an addon that will allow developers to run interaction tests directly in the browser, using testing library. We'd also love to include the matcher extenders so that developers can use the assertions from
jest-dom/extend-expect, however importing things directly fromcssresult in the following failure:Module not found: Error: Can't resolve 'fs'This is an issue that happened as well in the
testing-library/jasmine-dompackage and was addressed with the exact same fix as this PR: testing-library/jasmine-dom#8Why:
These changes would allow this library to run in the browser without breaking
How:
Given that the library only needs
cssParse, there is no need to import it from the root of the package. Importing it from the root makes other files be imported as well, which results in the error mentioned above.Checklist: