- 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.
推薦閱讀
- 新編Visual Basic程序設計上機實驗教程
- 騰訊iOS測試實踐
- Android開發精要
- Oracle Database In-Memory(架構與實踐)
- C和C++安全編碼(原書第2版)
- 基于Java技術的Web應用開發
- PostgreSQL技術內幕:事務處理深度探索
- OpenNI Cookbook
- Processing互動編程藝術
- UML+OOPC嵌入式C語言開發精講
- Statistical Application Development with R and Python(Second Edition)
- 精通MySQL 8(視頻教學版)
- Webpack實戰:入門、進階與調優(第2版)
- 新印象:解構UI界面設計
- Training Systems Using Python Statistical Modeling