Get a concise introduction to Jasmine, the popular behavior-driven testing framework for JavaScript. This practical guide shows you how to write unit tests with Jasmine that automatically check for bugs in your application. Learn how to write specifications for individual components, and then use th
JavaScript Testing with Jasmine: JavaScript Behavior-Driven Development
โ Scribed by Evan Hahn
- Publisher
- O'Reilly Media
- Year
- 2013
- Tongue
- English
- Leaves
- 50
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
- Get an overview of both test-driven and behavior-driven development
- Write useful specs by determining what you need to testโand what you donโt
- Test the behavior of new and existing code against the specs you create
- Apply Jasmine matchers and discover how to build your own
- Organize code suites into groups and subgroups as your code becomes more complex
- Use a Jasmine spy in place of a function or an objectโand learn why itโs valuable
โฆ Table of Contents
Copyright......Page 2
Table of Contents......Page 3
Conventions Used in This Book......Page 5
Safariยฎ Books Online......Page 6
Acknowledgments......Page 7
What Is Software Testing?......Page 9
Behavior-Driven Development......Page 10
Getting Set Up with Jasmine......Page 13
An Example to Test......Page 14
Jasmine Time!......Page 15
Matchers......Page 16
Writing the Tests First with Test-Driven Development......Page 17
Test Components......Page 21
Black-Box Testing......Page 22
Identity: toBe......Page 23
Yes or No? toBeTruthy, toBeFalsy......Page 24
Check If an Element Is Present with toContain......Page 25
Is It NaN? toBeNaN......Page 26
Nearness: toBeCloseTo......Page 27
Custom Matchers......Page 28
Before and After......Page 31
Skipping Specs and Suites......Page 32
Matching Class Names......Page 33
The Basics: Spying on a Function......Page 35
Calling Through: Making Your Spy Even Smarter......Page 37
Creating a New Spy Function......Page 38
Creating a New Spy Object......Page 39
Jasmine and CoffeeScript......Page 41
Basic Usage......Page 42
jasmine-node and CoffeeScript......Page 43
Usage......Page 44
More Tools......Page 45
The Basic Structure of a Suite......Page 47
Reserved Words in Jasmine......Page 48
About the Author......Page 50
๐ SIMILAR VOLUMES
Get a concise introduction to Jasmine, the popular behavior-driven testing framework for JavaScript. This practical guide shows you how to write unit tests with Jasmine that automatically check for bugs in your application. Learn how to write specifications for individual components, and then use th
<Div> Get a concise introduction to Jasmine, the popular behavior-driven testing framework for JavaScript. This practical guide shows you how to write unit tests with Jasmine that automatically check for bugs in your application. Learn how to write specifications for individual components, and then
<p>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 to write server-side applications. Using behavior-driven development and some common testing patterns and best practices, y
For javascript developers working on increasingly large and complex projects, effective automated testing is crucial to success. Test-Driven javascript Development is a complete, best-practice guide to agile javascript testing and quality assurance with the test-driven development (TDD) methodology.
For JavaScript developers working on increasingly large and complex projects, effective automated testing is crucial to success. <b>Test-Driven JavaScript Development is a complete, best-practice guide to agile JavaScript testing and quality assurance with the test-driven development (TDD) method