Jasmine Cookbook
eBook - ePub

Jasmine Cookbook

Munish Sethi

Buch teilen
  1. 276 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Jasmine Cookbook

Munish Sethi

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Jasmine Cookbook als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Jasmine Cookbook von Munish Sethi im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in JavaScript. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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

Inhaltsverzeichnis