Jasmine Testing for JavaScript
Jasmine Testing for JavaScript
Jasmine Testing for JavaScript

This book is 20% complete

Last updated on 2015-01-25

About the Book

Are you writing complex JavaScript applications and struggling to keep them bug free? Once you've found one bug, do you know how to keep it from reemerging in the future?

This book will take you deep into the dangerous and secretive world of JavaScript testing using the Jasmine framework. As a new employee at MI7.5 you will be tasked with solving critical problems and keeping the free world safe, one spec at a time.

Table of Contents

  • A Note About The Book
  • Preface
    • The Universal Language
    • Testing in JavaScript
    • Jasmine
    • How to Use This Book
    • Technical Requirements
  • Getting Started
    • Welcome to MI7.5
    • The Development Process
    • Getting Started with Jasmine
  • Your First Assignment
    • Meeting the Code Length Requirement
    • A Brief Detour on Terminology
    • Meeting the Digit Requirement
    • Meeting the Minimum Different Characters Requirement
  • Generalizing Validation
    • Stubbing out the specs
    • Creating multiple validators
    • Allowing validators to accept multiple requirements
    • Getting the validity and failure messages
  • Appendix A: Matchers Index
    • toBe
    • toBeCloseTo
    • toBeDefined
    • toBeFalsy
    • toBeGreaterThan
    • toBeLessThan
    • toBeNull
    • toBeTruthy
    • toBeUndefined
    • toContain
    • toEqual
    • toHaveBeenCalled
    • toHaveBeenCalledWith
    • toMatch
    • toThrow
    • not
  • Appendix B: Jasmine in the Terminal
    • The Benefits
    • What you’ll need
    • Setting up the dependencies
    • Configuring Grunt
    • Running the specs

About the Author

Joshua Clanton
Joshua Clanton

Joshua Clanton is a Senior UI Developer at Hobsons, where he works on improving user experience through quality code.

He is also the publisher of the weekly A Drip of JavaScript newsletter.

When he's not writing JavaScript or hanging out with family, you're likely to find Joshua with his nose stuck in a Science Fiction novel.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub