Backbone.js testing : plan, architect, and develop tests for Backbone.js applications using modern testing principles and practices /: plan, architect, and develop tests for Backbone.js applications using modern testing principles and practices. (2013)
- Record Type:
- Book
- Title:
- Backbone.js testing : plan, architect, and develop tests for Backbone.js applications using modern testing principles and practices /: plan, architect, and develop tests for Backbone.js applications using modern testing principles and practices. (2013)
- Main Title:
- Backbone.js testing : plan, architect, and develop tests for Backbone.js applications using modern testing principles and practices
- Further Information:
- Note: Ryan Roemer.
- Other Names:
- Roemer, Ryan
- Contents:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1:Setting Up a Test Infrastructure; Designing an application and test repository structure; Getting the test libraries; Mocha; Chai; Sinon. JS; Setting up and writing our first tests; The test driver page; Adding some tests; Running and assessing test results; The first test report; Test report actions; Test timing and slow tests; Test failures; Summary; Chapter 2:Creating a Backbone.js Application Test Plan; A Backbone.js refresher. Selecting a Backbone.js application to testGetting acquainted with the Notes application; Anatomy of the Notes application; Test paradigms and methods; Testing concepts, approaches, and planning; Testing individual Backbone.js components; Models; Collections; Templates; Views; Routers; Utilities; Testing application interactions and events; Partial integrations; Events; Dipping our toes in the application testing waters; Namespace; Note model; Running the application tests; Summary; Chapter 3:Test Assertions, Specs, and Suites; Choosing a test style that fits; Mocha test interfaces. Chai assertion stylesTrying out some different styles; Mocha and Chai BDD interfaces; Mocha TDD and Chai assert styles; Deciding on the project style; A tour of the Chai assertion library; Chaining objects and assertions; Basic value assertions; Comparing values; Object and array validation; Errors; Getting the application and tests ready to run;Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1:Setting Up a Test Infrastructure; Designing an application and test repository structure; Getting the test libraries; Mocha; Chai; Sinon. JS; Setting up and writing our first tests; The test driver page; Adding some tests; Running and assessing test results; The first test report; Test report actions; Test timing and slow tests; Test failures; Summary; Chapter 2:Creating a Backbone.js Application Test Plan; A Backbone.js refresher. Selecting a Backbone.js application to testGetting acquainted with the Notes application; Anatomy of the Notes application; Test paradigms and methods; Testing concepts, approaches, and planning; Testing individual Backbone.js components; Models; Collections; Templates; Views; Routers; Utilities; Testing application interactions and events; Partial integrations; Events; Dipping our toes in the application testing waters; Namespace; Note model; Running the application tests; Summary; Chapter 3:Test Assertions, Specs, and Suites; Choosing a test style that fits; Mocha test interfaces. Chai assertion stylesTrying out some different styles; Mocha and Chai BDD interfaces; Mocha TDD and Chai assert styles; Deciding on the project style; A tour of the Chai assertion library; Chaining objects and assertions; Basic value assertions; Comparing values; Object and array validation; Errors; Getting the application and tests ready to run; The Mocha test runner; Reconfiguring the application for testing; Organizing topics and specifications into test suites; Starting up and winding down tests; Writing Mocha test specifications; Asynchronous behavior in tests. Some Backbone.js collection testsTesting and supporting Backbone.js views; The Notes application single note view; Creating HTML fixtures for view tests; Walking through the view test suite; Aggregating and running the application tests; Test development tips, tricks, and hints; Isolating and excluding tests; Writing testable application code; Summary; Chapter 4:Test Spies; Fake it 'til you make it; Getting to know Sinon. JS; Spying on functions with Sinon. JS; Anonymous spies; Spy assertions; Function spies; Object method spies; Playing in the sandbox with Sinon. JS test helpers. Delving into the Sinon. JS spy APIThe spy API; The spy call API; Spicing up Chai with the Sinon. JS plugin; Introducing and installing Chai plugins; The Sinon. JS plugin; Testing Backbone.js components with spies; The Notes menu bar view; The menu bar view; Testing and spying on the menu bar view; The Notes single note view; The single note view; Testing the single note view; Hooking up and running the view tests; Summary; Chapter 5:Test Stubs and Mocks; Replacing method behaviors with Sinon. JS stubs; Getting started with stubs; The stub API; Faking and verifying behavior with Sinon. JS mocks. … (more)
- Publisher Details:
- Birmingham : Packt Pub
- Publication Date:
- 2013
- Extent:
- 1 online resource (iv, 154 pages :), illustrations (some color)
- Subjects:
- 005.2
COMPUTERS -- Programming Languages -- JavaScript
JavaScript (Computer program language)
Web site development
Application software -- Development
COMPUTERS -- General
Application software -- Development
JavaScript (Computer program language)
Web site development
COMPUTERS -- Internet -- Application Development
COMPUTERS -- Web -- Web Programming
Electronic books
Electronic books - Languages:
- English
- ISBNs:
- 9781782165255
1782165258
9781782165248 - Related ISBNs:
- 178216524X
9781782165248 - Access Rights:
- Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK).
- Access Usage:
- Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force.
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library HMNTS - ELD.DS.86714
- Ingest File:
- 01_081.xml