万本电子书0元读

万本电子书0元读

顶部广告

Jasmine Cookbook电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Munish Sethi

出  版  社:Packt Publishing

出版时间:2015-04-24

字       数:107.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
If you are a competent JavaScript developer who wants to design and implement tests using Jasmine in order to minimize bugs in the production environment, then this book is ideal for you. Some familiarity with unit testing and code coverage concepts such as branch coverage along with basic knowledge of Node.js, AngularJS, and CoffeeScript is required.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部