- 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.
推薦閱讀
- 極簡(jiǎn)算法史:從數(shù)學(xué)到機(jī)器的故事
- Mastering Ext JS(Second Edition)
- Mastering Visual Studio 2017
- Java范例大全
- 青少年美育趣味課堂:XMind思維導(dǎo)圖制作
- FFmpeg入門詳解:音視頻流媒體播放器原理及應(yīng)用
- Rust Essentials(Second Edition)
- 劍指大數(shù)據(jù):企業(yè)級(jí)數(shù)據(jù)倉(cāng)庫(kù)項(xiàng)目實(shí)戰(zhàn)(在線教育版)
- Web前端應(yīng)用開發(fā)技術(shù)
- 跟戴銘學(xué)iOS編程:理順核心知識(shí)點(diǎn)
- 計(jì)算語(yǔ)言學(xué)導(dǎo)論
- Maven for Eclipse
- iOS Development with Xamarin Cookbook
- Spring MVC Blueprints
- 少年小魚的魔法之旅:神奇的Python