官术网_书友最值得收藏!

Preface

JavaScript is not only widely used to create attractive user interfaces for the Web, but, with the advent of Node.js, it is also becoming a very popular and powerful language with which to write server-side applications. In this context, JavaScript systems are no longer toy applications, and their complexity has grown exponentially. To create complex applications that behave correctly, it is almost mandatory to cover these systems with an automated test suite. This is especially true in JavaScript because it does not have a compiler to help developers. Unfortunately, it is easy to fall into testing pitfalls that will make your test suite brittle; hard to maintain, and sooner or later, they will become another headache instead of a solution. Using behavior-driven development and some common testing patterns and best practices, you will be able to avoid these traps.

A lot of people see the whole TDD/BDD approach as a black-and-white decision. Either you do not do it, or you try to achieve a hundred percent test coverage. The real world calls for a more pragmatic approach: write the tests that really pay off and do not write those that do not give you much value. To be able to take this kind of decision, a good knowledge of BDD and the costs associated with it is needed.

主站蜘蛛池模板: 泸溪县| 香港| 嘉祥县| 洪雅县| 深水埗区| 房山区| 通化市| 嵩明县| 灵山县| 舒兰市| 喀喇沁旗| 威宁| 大竹县| 霍林郭勒市| 曲周县| 新乡县| 双鸭山市| 岢岚县| 梁河县| 宜州市| 甘孜县| 台州市| 资阳市| 临海市| 富蕴县| 江山市| 东源县| 新和县| 濉溪县| 中山市| 石门县| 丹棱县| 永善县| 建湖县| 新乡县| 宁德市| 休宁县| 安吉县| 乾安县| 广汉市| 北宁市|