Email the Author

You can use this page to email David Sulc about Marionette.js: Testing and Refactoring.

Please include an email address so the author can respond to your query

This message will be sent to David Sulc

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

Come along as we test the "Contact Manager" application (developed in Backbone.Marionette.js: A Gentle Introduction) and refactor the messier parts. You'll learn the fundamental concepts and apply them through guided exercises, using Sinon, Mocha, and Chai.

By the time you're through with the book, you'll understand how and why to keep tests independent, as well as avoiding duplication in test code with judicious refactoring and helper functions. These skills will assist you in improving the application code and developing new features without introducing regressions. We will also cover how to run tests from the command line, so your new test suite can be used within a continuous integration environment.

We'll cover testing the application code in such a way that you will rapidly be able to apply these concepts to your own projects. We will see how to:

  • set up and tear down test environments;
  • handle tests for asynchronous functionality;
  • test code relying on timers;
  • write readable assertions and test code;
  • leverage javascript to keep test code short, DRY, and readable;
  • use spies and stubs to keep tests decoupled from application code specifics.

And more, of course. The entire book is platform-/framework-independent as is doesn't rely on any server: we'll be testing only the client-side code.

Do note, however, that we implement the verifications using mainly stubs (with occasional spies), and mocks are only discussed in the last chapter. Didn't understand that last sentence? Don't worry: you probably won't care about the difference. This book will show you how easy testing can be, and will do so painlessly!


About the Author

David Sulc’s avatar David Sulc

@davidsulc

I spend most of my time applying technologies to business problems and like many, I acquire new technology skills in a self-taught manner. What I really enjoy is understanding subjects well enough to be able to teach others about them in a straightforward "this makes complete sense" style.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Marionette-testing › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss