xwp / wp-js-widgets

JS Widgets plugin for WordPress
https://wordpress.org/plugins/js-widgets/
40 stars 7 forks source link

Consider integration tests for your WP REST API endpoints #7

Open danielbachhuber opened 8 years ago

danielbachhuber commented 8 years ago

Hi!

On behalf of Pantheon, I'm writing a tutorial on why integration tests are critical for your WP REST API endpoints, and how you can go about writing them.

Given your use of register_rest_field(), I think you could benefit from reading and applying the tutorial. And, because the tutorial isn't yet published, I'd very much appreciate any constructive criticism you have, so that we can make the tutorial an evergreen resource for the community.

Thanks in advance for your time. Happy to take any questions, comments, etc. you might have in this Github issue, or on the document itself (you'll need to be signed into Dropbox).

westonruter commented 8 years ago

👍 writing the tests is something that needs to be done for all of the codebase. I didn't want to jump into writing tests before I could prove the proof of concept.