Jasmine Cookbook
eBook - ePub

Jasmine Cookbook

Munish Sethi

Condividi libro
  1. 276 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Jasmine Cookbook

Munish Sethi

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Jasmine Cookbook è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Jasmine Cookbook di Munish Sethi in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in JavaScript. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
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...

Indice dei contenuti