Summary

We have seen that TDD and BDD are different techniques. BDD is a refinement of TDD; it emphasizes that the important thing is to test behaviors of the system that are relevant to the stakeholders and users.

BDD allows us to write more coherent test suites that can evolve at the same speed as our requirements. A good BDD test suite will give us the ability to track which behaviors are not working correctly in our system and which tests should be changed when we need to change the functionality of the system.

Finally, it is important to distinguish between BDD and integration tests. An integration test checks several problem domains at the same time. This often leads to confused tests that try to test everything and, in the end, are not very ...

Get Learning Behavior-driven Development with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.