Great writeup by Steve Persch on how we’ve been using Behat and CircleCI for WordPress plugin integration tests.
Bill from Georgetown writes: Just curious, what made you choose Behat for [WP-CLI] testing rather than PHPUnit like WordPress core, EDD and a lot of other big WordPress plugins? Is it just for easier readability of tests, or is there more to it? I have a few projects that need unit testing and am trying […]
You absolutely need test coverage for your WP REST API project. I wrote a tutorial for Pantheon that I hope becomes the canonical reference point for everyone considering whether or not to write tests for their endpoints — please do.
I just tried this and it worked much better than I expected: Happy Friday everyone!
I had a really difficult time this morning setting up React + Webpack + Mocha + Chai + Enzyme. All roads with Mocha seem to lead to Karma, which I don’t want to use because I don’t want the complexity of a headless browser. And, all past roads with Mocha but without Karma seem to be […]
Mocking your ideal application state for tests still takes a fair amount of effort. It would be cool to see a WP-CLI command to: Stash your current database. Interactively create your mocked data. Export mocked data for use in tests. Restore your database. From a Twitter thread with Joe.