Open tiberiuichim opened 1 year ago
What's the benefit of unit testing via webpack instead of the status quo?
@davisagli testing with jest is fine for pure JS code, but I find that we don't do a good job with testing standalone components, because it's hard to model all the interactions of component. Maybe we should get more comfortable with react testing library, but, if you look in Volto's code, you won't find a single version of a "good jest test" for a component. We have a ton of bogus snapshots and our widgets are mocked in tests.
So, it would provide a middle ground between full and slow Cypress integration and faster, standalone component tests (I think storybook might have a test runner, we could look into that, as well).
Having a webpack config setup (the Volto specifics can be mostly extracted from the storybook configuration) would enable unit testing components via webpack.