Book description
If you dread the business of testing JavaScript and Backbone.js web applications, this book is your guardian angel. In easy stages and lots of examples it takes you through the whole testing situation, introducing you to best practice and current techniques.
- Create comprehensive test infrastructures
- Understand and utilize modern frontend testing techniques and libraries
- Use mocks, spies, and fakes to effortlessly test and observe complex Backbone.js application behavior
- Automate tests to run from the command line, shell, or practically anywhere
In Detail
Frontend web applications are soaring in popularity and the Backbone.js library is leading this charge with a modular, lightweight approach for organizing JavaScript web applications. At the same time, testing client-side JavaScript and Backbone.js programs remains a difficult and tedious undertaking.
Backbone.js Testing brings sensible practices and current techniques to the challenges of Backbone.js test development. The book introduces fundamental testing concepts, comprehensive test infrastructure design, and practical exercises to easily and systematically test modern JavaScript web applications.
The book progresses from Mocha test suites and Chai assertions to advanced test mocks and stubs with Sinon.JS. The requisite libraries and utilities are introduced with in-depth examples and best practices for integration with your applications. The book guides you through the test planning and implementation processes for your application models, views, routers, and other Backbone.js components.
Backbone.js Testing gives you the tools, examples, and assistance to test your Backbone.js web applications thoroughly, quickly, and with confidence.
Table of contents
-
Backbone.js Testing
- Table of Contents
- Backbone.js Testing
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Setting Up a Test Infrastructure
-
2. Creating a Backbone.js Application Test Plan
- A Backbone.js refresher
- Selecting a Backbone.js application to test
- Test paradigms and methods
- Testing concepts, approaches, and planning
- Testing individual Backbone.js components
- Testing application interactions and events
- Dipping our toes in the application testing waters
- Running the application tests
- Summary
-
3. Test Assertions, Specs, and Suites
- Choosing a test style that fits
- Trying out some different styles
- A tour of the Chai assertion library
- Getting the application and tests ready to run
- Writing Mocha test specifications
- Testing and supporting Backbone.js views
- Aggregating and running the application tests
- Test development tips, tricks, and hints
- Summary
- 4. Test Spies
- 5. Test Stubs and Mocks
- 6. Automated Web Testing
- Index
Product information
- Title: Backbone.js Testing
- Author(s):
- Release date: July 2013
- Publisher(s): Packt Publishing
- ISBN: 9781782165248
You might also like
book
Mastering Backbone.js
Design and build scalable web applications using Backbone.js About This Book Level up your Backbone.js skills …
book
Developing Backbone.js Applications
If you want to build your site’s frontend with the single-page application (SPA) model, this hands-on …
book
CSS Refactoring
Revisiting your code to remove redundancies and inconsistencies—known as refactoring—is a common practice when using programming …
article
Run Llama-2 Models Locally with llama.cpp
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …