Introduction To cy-spok Plugin For Writing Powerful Assertions For Objects

Описание к видео Introduction To cy-spok Plugin For Writing Powerful Assertions For Objects

This video shows how to use cy-spok https://github.com/bahmutov/cy-spok plugin (which is a wrapper around the https://github.com/thlorenz/spok assertion library) to write powerful assertions in Cypress tests. In a single shot you can confirm both the values inside an object, and other conditions, like a property should be a string, or a number larger than N, etc.

Whenever the cy-spok assertion passes or fails, it outputs all relevant information to the Cypress Command Log, showing you precisely what the values were, and why the assertion might have failed. Check out a small usage example in https://github.com/bahmutov/vue-vuex-... repo.

Комментарии

Информация по комментариям в разработке