robbieaverill

sorry, we're deploying some search updates and this site was the unfortunate one not made with silverstripe so it takes a bit longer to update 🙂

robbieaverill

yeah i'm sure it's been fixed a couple of times now 😄

robbieaverill

yeah we use jest + enzyme for testing react stuff mainly. there's also jest + ReactTestUtils in some of the older JS tests in core, but enzyme is the preferred approach going forward

robbieaverill

the arguments for renderWith are template file names

robbieaverill

hi @Ivoba, yes that example works as you've mentioned. Travis installs our modules automatically when the container spins up, we then install either silverstripe/recipe-core or silverstripe/recipe-cms (depending on if we need the CMS or not), and the module's codebase is then treated like a project for the sake of unit tests. vendor/bin/phpunit works in Travis because we configure a testsuite in phpunit.xml to point to the tests folder. The only difference you might find between installing a module or as a project is if you're referencing relative file paths, but if you aren't then it should be plug and play.

robbieaverill

there's a PR to do it now for SS4's version but it hasn't been reviewed yet 🙂

robbieaverill

it should be part of advanced workflow 🙂

👍 (1)
robbieaverill

@nate-sd i've fixed this in https://github.com/silverstripe/silverstripe-framework/commit/f1d8a04928f6e94bf3fb6b2e0e399dea01ca6778, thanks for raising it - in future you'd be welcome to raise PRs for anything you find broken/missing/incorrect in the docs 😃