wmk

basically trying to get it running in my yarn/mix project...

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

wmk

"needs"... after using phpunit a lot in the last weeks, I think TDD with JS is also nice. And if I can run the test suite on deployment or on checkin, it should make my application better

kinglozzer

I’ve never written an application that really needs it, but SilverStripe admin etc uses jest

wmk

how do you test javascript? E.g. get stuff from DOM, do something, etc..?

theruss

Maybe even something like Director::mockRequest() but rather Director::spyOnRequest()

theruss

Something like FunctionalTest::withBaseURL() but more like FunctionalTest::withCompleteURL()

theruss

Does anyone know of a way to run a FunctionalTest such that the SUT is in the context of a specific HTTPRequest?