decred / politeiagui

ISC License
62 stars 56 forks source link

feat(politeiagui-scripts): add jest/babel configuration #2838

Closed tiagoalvesdulce closed 2 years ago

tiagoalvesdulce commented 2 years ago

This PR adds babel configuration for jest test env to politeiagui-scripts. This way, babel.config and jest.config are no longer needed on plugins. If the plugin has a babel.config or jest.config the default configs will be ignored and the plugin file will be the one used by politeiagui-scripts.

tiagoalvesdulce commented 2 years ago

I'm not sure if I'm doing the correct setup, but when I run the politeiagui-scripts test command on packages/core path, I get the following error

Yeah, you have to run a fresh yarn install inside politeiagui-scripts.

In order to avoid that, I think it would be nice if you added some examples for that command on politeiagui-scripts readme. What do you think?

I don't think we need that since it's just a package that moved from the plugins/apps to the politeiagui-scripts package

victorgcramos commented 2 years ago

@tiagoalvesdulce after a fresh install, it works as expected. Thanks!