- Learning Behavior:driven Development with JavaScript
- Enrique Amodeo
- 117字
- 2021-07-23 20:52:34
Chapter 2. Automating Tests with Mocha, Chai, and Sinon
Before we start making some BDD, let's familiarize ourselves with the basic tools available in JavaScript to write and execute a test. In this chapter, we will explore the main capabilities of Mocha, the most popular test runner in JavaScript. We will perform the following tasks:
- Writing expressive assertions using the Chai package
- Creating test doubles using the Sinon and sinon-chai packages
- Exploring the basic techniques for organizing our test codebase
To achieve these goals, we will perform a small code kata, or coding exercise, where we will be able to practice not only the tools, but also the test-first cycle explained in the previous chapter.
推薦閱讀
- 觸·心:DT時代的大數據精準營銷
- Apache Karaf Cookbook
- Protocol-Oriented Programming with Swift
- Keras深度學習實戰
- 新印象:解構UI界面設計
- 深入理解BootLoader
- RocketMQ實戰與原理解析
- Vue.js光速入門及企業項目開發實戰
- Mastering Android Studio 3
- 零基礎C#學習筆記
- HTML5與CSS3權威指南
- Microsoft Dynamics GP 2013 Cookbook
- Flask開發Web搜索引擎入門與實戰
- 3D Printing Designs:Design an SD Card Holder
- React.js 16從入門到實戰