Jasmine Cookbook
eBook - ePub

Jasmine Cookbook

Munish Sethi

Compartir libro
  1. 276 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Jasmine Cookbook

Munish Sethi

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Jasmine Cookbook un PDF/ePUB en línea?
Sí, puedes acceder a Jasmine Cookbook de Munish Sethi en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in JavaScript. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781784397166

Jasmine Cookbook


Table of Contents

Jasmine Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Jasmine Framework
Introduction
Writing your first Jasmine test
Getting ready
How to do it...
How it works...
See also
Adding specs to your Jasmine test
How to do it…
How it works...
See also
Adding expectations and matchers to the test
How to do it…
How it works...
Applying different matchers to the Jasmine test
How to do it…
How it works...
Applying setup and teardown functions to the Jasmine test
Getting ready
How to do it…
How it works...
Using the "this" keyword
Getting ready
How to do it…
How it works...
2. Jasmine with TDD and BDD Processes
Introduction
Writing Jasmine tests using TDD and BDD processes
Getting ready
How to do it...
How it works...
Creating a Jasmine test for new code using TDD and BDD
Getting ready
How to do it...
How it works...
Designing Jasmine tests for existing code using TDD and BDD
Getting ready
How to do it...
How it works...
Defining nested suites to write more meaningful specs
Getting ready
How to do it...
How it works...
3. Customizing Matchers and Jasmine Functions
Introduction
Writing a Jasmine test using a custom equality tester function
How to do it...
How it works...
Writing Jasmine tests with custom matchers
How to do it...
How it works...
Writing Jasmine tests for exceptions
How to do it...
How it works...
Declaring pending specs with Jasmine tests
Getting ready
How to do it...
4. Designing Specs from Requirement
Introduction
Writing useful specs by analyzing the test requirements
How to do it...
How it works...
Implementing the Jasmine test corresponding to the specs
How to do it...
How it works...
Applying Acceptance Criteria to the Jasmine test
How to do it...
How it works...
Organizing Jasmine specs into groups and subgroups
How to do it...
5. Jasmine Spies
Introduction
Writing Jasmine tests using the spyOn() method and special matchers for spies
Getting ready
How to do it...
How it works...
Writing Jasmine tests using tracking properties
How to do it…
How it works...
Writing Jasmine tests with your own custom spy method
Getting ready
How to do it...
How it works...
Using jasmine.any and jasmine.objectContaining
Getting ready
How to do it…
How it works...
Writing Jasmine tests to mock the JavaScript timeout functions
How to do it…
How it works...
6. Jasmine with AJAX, jQuery, and Fixtures
Introduction
Writing Jasmine specs for AJAX
Getting ready
How to do it...
How it works...
Designing Jasmine specs with HTML and JSON fixtures
Getting ready
How to do it...
How it works...
Writing Jasmine specs for jQuery
Getting ready
How to do it...
How it works...
Writing Jasmine specs using custom jQuery matchers
Getting ready
How to do it…
How it works...
Writing Jasmine specs for asynchronous operations using the done() function
How to do it…
How it works...
7. Code Coverage with Jasmine Tests
Introduction
Configuring code coverage tools
Getting ready
How to do it...
How it works...
See also
Generating code coverage using karma and istanbul
Getting ready
How to do it...
How it works...
See also
Writing Jasmine specs for uncovered branches/code
How to do it...
How it works...
Increasing code coverage for existing code
How to do it...
How it works...
8. Jasmine with Other Tools
Introduction
Writing Jasmine tests for AngularJS
Getting ready
How to do it...
How it works...
Using Jasmine with CoffeeScript
Getting ready
How to do it...
How it works...
Writing Jasmine tests for Node.js
Getting ready
How to do it...
How it works...
9. Developing JavaScript Apps Using Jasmine – a Real-time Scenario
Introduction
Defining Jasmine specs corresponding to a user story
Getting ready
How to do it...
See also
Implementing Jasmine specs with Web/HTML
Getting ready
How to do it...
How it works...
Implementing Jasmine tests with a Data-Driven approach
How to do it...
Creating Jasmine tests for a change request
Getting ready
How to do it...
Index

Jasmine Cookbook

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1200415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-716-6
www.packtpub.com

Credits

Author
Munish Sethi
Reviewer
Devin Weaver
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Larissa Pinto
Content Development Editor
Ajinkya Paranjape
Technical Editor
Vivek Pala
Copy Editors
Pranjali Chury
Kriti Sharma
Project Coordinator
Harshal Ved
Proofreaders
Martin Diver
Elinor Perry-Smith
Paul Hindle
Indexer
Mariammal Chettiyar
Production Coordinator
Nitesh Thakur
Cover Work
Nitesh Thakur
2323__pe...

Índice