collective / gatsby-starter-plone

Gatsby starter for Plone
https://collective.github.io/gatsby-starter-plone/
MIT License
4 stars 3 forks source link

Unit tests and CI with Travis #9

Open ajayns opened 6 years ago

datakurre commented 6 years ago

@ajayns I'm currently adding example build to gh-pages, but what would be good practice to test in these starters?

ajayns commented 6 years ago

I believe that'd be okay to have as we'll get a live demo as well then. But robot tests are something I don't think starters use, they just have unit tests

datakurre commented 6 years ago

@ajayns But what would the unit tests test?

ajayns commented 6 years ago

I couldn't find much docs for it, still digging for implementations, but I found these: https://github.com/DesarrolloWebSantaCC/santacc-web/tree/master/test - Jest, E2E tests https://gist.github.com/m-allanson/3dd343db56951ba852fd09a7e52d6a89 - Jest setup

Maybe we could use some help from the Gatsby community here: cc / @KyleAMathews @m-allanson

datakurre commented 6 years ago

@ajayns Something easy and usual would be to follow jest guides and write snapshot tests for react components.

m-allanson commented 6 years ago

There's an open PR to add a unit testing guide to the Gatsby docs, which may be useful?

And further down the comments in that PR there's a starter that sets up Gatsby with Jest.

ajayns commented 6 years ago

Thanks a bunch @m-allanson ! We really appreciate this and the support the community has been giving so far :)