Readable Cypress.io tests

1 · Gleb Bahmutov · April 1, 2019, 4 a.m.
The tests should be simple to read and understand. The tests are already a layer on top the production code that is complex, so they should not add their own quirks or gotchas. In this blog post I will show how to make the tests express their meaning by adding custom Cypress commands, and how to make assertions really simple to understand by extending the default Chai assertions.Note: these examples come from the repository bahmutov/todo-api-with-json-schema.The exampleIn my example application,...