Commit Graph

1 Commits

Author SHA1 Message Date
Mike Jolley 253a0160f1 Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553)
* Add schema validation helper

* Add tests for cart item schema

* Fix schema errors found by tests

* Add tests and fix validation for remaining store API endpoints

* Tweak response for nested diffs

* Array syntax

* Improved nesting and type validation for schema

* Implement and fix type checking across test suite

* Type validation fixes

* Fix null comparison

* Fix array handling

* Switch to number type and support in validation

* Test the tests

* Update tests to use objects which match schema, avoiding JSON encode/decode
2020-01-17 11:34:15 +00:00