Preface; Who Should Read This Book; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Intro to Testing; 1.1 What Is Software Testing?; 1.2 Why Is It Useful?; 1.3 Test-Driven Development; 1.4 Behavior-Driven Development; Chapter 2: Jasmine; 2.1 What Is Jasmine?; 2.2 Getting Set Up with Jasmine; 2.3 Testing Existing Code with describe, it, and expect; 2.4 Matchers; 2.5 Writing the Tests First with Test-Driven Development; Chapter 3: Writing Good Tests; 3.1 Cardinal Rule: When in Doubt, Test; 3.2 Test Components; 3.3 Black-Box Testing; Chapter 4: Matchers in Depth; 4.1 Equality: toEqual; 4.2 Identity: toBe; 4.3 Yes or No? toBeTruthy, toBeFalsy; 4.4 Negate Other Matchers with not; 4.5 Check If an Element Is Present with toContain; 4.6 Is It Defined? toBeDefined, toBeUndefined; 4.7 Nullness: toBeNull; 4.8 Is It NaN? toBeNaN; 4.9 Comparators: toBeGreaterThan, toBeLessThan; 4.10 Nearness: toBeCloseTo; 4.11 Using toMatch with Regular Expressions; 4.12 Checking If a Function Throws an Error with toThrow; 4.13 Custom Matchers; Chapter 5: More Jasmine Features; 5.1 Before and After; 5.2 Nested Suites; 5.3 Skipping Specs and Suites; 5.4 Matching Class Names; Chapter 6: Spies; 6.1 The Basics: Spying on a Function; 6.2 Calling Through: Making Your Spy Even Smarter; 6.3 Making Sure a Spy Returns a Specific Value; 6.4 Replacing a Function with a Completely Different Spy; 6.5 Creating a New Spy Function; 6.6 Creating a New Spy Object; Chapter 7: Using Jasmine with Other Tools; 7.1 Jasmine and CoffeeScript; 7.2 Jasmine and Node.js; 7.3 Jasmine and Ruby on Rails; 7.4 Jasmine with Non-Rails Ruby; 7.5 More Tools; Chapter 8: Reference; 8.1 Jasmine on the Web; 8.2 The Basic Structure of a Suite; 8.3 Matchers Reference; 8.4 List of Falsy Values; 8.5 Reserved Words in Jasmine; Colophon;
Show morePreface; Who Should Read This Book; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Intro to Testing; 1.1 What Is Software Testing?; 1.2 Why Is It Useful?; 1.3 Test-Driven Development; 1.4 Behavior-Driven Development; Chapter 2: Jasmine; 2.1 What Is Jasmine?; 2.2 Getting Set Up with Jasmine; 2.3 Testing Existing Code with describe, it, and expect; 2.4 Matchers; 2.5 Writing the Tests First with Test-Driven Development; Chapter 3: Writing Good Tests; 3.1 Cardinal Rule: When in Doubt, Test; 3.2 Test Components; 3.3 Black-Box Testing; Chapter 4: Matchers in Depth; 4.1 Equality: toEqual; 4.2 Identity: toBe; 4.3 Yes or No? toBeTruthy, toBeFalsy; 4.4 Negate Other Matchers with not; 4.5 Check If an Element Is Present with toContain; 4.6 Is It Defined? toBeDefined, toBeUndefined; 4.7 Nullness: toBeNull; 4.8 Is It NaN? toBeNaN; 4.9 Comparators: toBeGreaterThan, toBeLessThan; 4.10 Nearness: toBeCloseTo; 4.11 Using toMatch with Regular Expressions; 4.12 Checking If a Function Throws an Error with toThrow; 4.13 Custom Matchers; Chapter 5: More Jasmine Features; 5.1 Before and After; 5.2 Nested Suites; 5.3 Skipping Specs and Suites; 5.4 Matching Class Names; Chapter 6: Spies; 6.1 The Basics: Spying on a Function; 6.2 Calling Through: Making Your Spy Even Smarter; 6.3 Making Sure a Spy Returns a Specific Value; 6.4 Replacing a Function with a Completely Different Spy; 6.5 Creating a New Spy Function; 6.6 Creating a New Spy Object; Chapter 7: Using Jasmine with Other Tools; 7.1 Jasmine and CoffeeScript; 7.2 Jasmine and Node.js; 7.3 Jasmine and Ruby on Rails; 7.4 Jasmine with Non-Rails Ruby; 7.5 More Tools; Chapter 8: Reference; 8.1 Jasmine on the Web; 8.2 The Basic Structure of a Suite; 8.3 Matchers Reference; 8.4 List of Falsy Values; 8.5 Reserved Words in Jasmine; Colophon;
Show moreEvan is a JavaScript developer currently enrolled at University of Michigan. He started coding in BASIC when he was 6 years old. In high school, he was the webmaster of his high school's online newspaper, where he learned how to make more of a real website (PHP, mySQL, JavaScript, jQuery). He most recently worked at UniversityNow, an educational startup in Palo Alto.
![]() |
Ask a Question About this Product More... |
![]() |