Lucas F. Costa 1/2/2017

How to Write Assertions Right

Read Original

This article provides best practices for writing assertions in automated tests, applicable to any programming language. It covers principles such as asserting on a single subject per test, avoiding loose assertions, and preventing multiple allowed outputs, using JavaScript examples. The advice is based on the author's experience as a Chai assertion library maintainer.

How to Write Assertions Right

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser