Book Image

Jasmine JavaScript Testing Update

By : Paulo Vitor Zacharias Ragonha
Book Image

Jasmine JavaScript Testing Update

By: Paulo Vitor Zacharias Ragonha

Overview of this book

Table of Contents (15 chapters)

Index

A

  • acceptance criterion
    • about / Acceptance criterion
  • assertion
    • about / Jasmine basics and thinking in BDD
  • asynchronous specs
    • about / Asynchronous specs
    • timeout / Timeout
  • attributes, React component
    • about / Component attributes (props)

B

  • Babel
    • URL / Module definition
    • about / Managing dependencies with NPM
  • basic View coding rules
    • about / Basic View coding rules
    • DOM element, encapsulating / The View should encapsulate a DOM element
  • behavior-driven development (BDD)
    • about / Jasmine and behavior-driven development
  • behavior checking
    • about / The "bare" spy
  • built-in matchers
    • toEqual / The toEqual built-in matcher
    • toBe / The toBe built-in matcher
    • toBeTruthy / The toBeTruthy and toBeFalsy matchers
    • toBeFalsy / The toBeTruthy and toBeFalsy matchers
    • toBeUndefined / The toBeUndefined, toBeNull, and toBeNaN built-in matchers
    • toBeNull / The toBeUndefined, toBeNull, and toBeNaN built-in matchers
    • toBeNaN / The toBeUndefined, toBeNull, and toBeNaN built-in matchers
    • toBeDefined / The toBeDefined built-in matcher
    • toContain / The toContain built-in matcher
    • toMatch / The toMatch built-in matcher
    • toBeLessThan / The toBeLessThan and toBeGreaterThan built-in matchers
    • toBeGreaterThan / The toBeLessThan and toBeGreaterThan built-in matchers
    • toBeCloseTo / The toBeCloseTo built-in matcher
    • toThrow / The toThrow built-in matcher

C

  • command-line interface (CLI) / Using HTML fixtures
  • composability, React component
    • about / Composing components
  • continuous integration
    • Travis-CI / Continuous integration – Travis-CI
  • custom matchers
    • about / Custom matchers
    • reference link / Custom matchers

D

  • describe function / Jasmine basics and thinking in BDD
  • DOM events
    • testing / Testing DOM events

E

  • Envjs
    • about / Downloading Jasmine
  • equals operator (==)
    • about / The toBe built-in matcher
  • events, React component
    • about / Component events
    • reference link / Component events
  • Express
    • about / Coding the server

F

  • fake XMLHttpRequest / A fake XMLHttpRequest

G

  • git
    • URL / Continuous integration – Travis-CI
  • GitHub
    • URL / Continuous integration – Travis-CI

H

  • headless browser
    • about / Downloading Jasmine
  • HTML fixtures
    • using / Using HTML fixtures
    • functions / Using HTML fixtures

I

  • immediately invoked function expression (IIFE)
    • about / The module pattern
  • InvestmentListView / Thinking in terms of components (Views)
  • Investment Tracker application
    • mockup interface / Thinking in terms of components (Views)
  • investment tracker application
    • about / The Investment Tracker application
    • setup function, implementing / Setup and teardown
    • teardown function, implementing / Setup and teardown

J

  • Jasmine
    • about / Jasmine and behavior-driven development
    • downloading / Downloading Jasmine
    • URL / Downloading Jasmine
    • basics / Jasmine basics and thinking in BDD
    • JSX, using with / Using JSX with Jasmine
  • jasmine-ajax / Jasmine stubs
  • Jasmine Ajax
    • about / Jasmine Ajax
    • adding, to project / Installing the plugin
    • URL / Installing the plugin
    • fake XMLHttpRequest / A fake XMLHttpRequest
  • Jasmine stubs
    • about / Jasmine stubs
  • JavaScript
    • limitations / JavaScript – the bad parts
    • about / Module definition
  • Jenkins
    • URL / Project setup
  • jQuery issue, GitHub ticket
    • reference link / Using HTML fixtures
  • jQuery matchers
    • Views, testing with / Testing Views with jQuery matchers
    • toBeMatchedBy / The toBeMatchedBy jQuery matcher
    • toContainHtml / The toContainHtml jQuery matcher
    • toContainElement / The toContainElement jQuery matcher
    • toHaveValue / The toHaveValue jQuery matcher
    • toHaveAttr / The toHaveAttr jQuery matcher
    • toBeFocused / The toBeFocused jQuery matcher
    • toBeDisabled / The toBeDisabled jQuery matcher
  • JSHint
    • about / Static code analysis: JSHint
    • URL / Static code analysis: JSHint
  • JSX
    • about / JSX
    • URL / JSX
    • using, with Jasmine / Using JSX with Jasmine
  • JSXHint
    • about / Static code analysis: JSHint

K

  • Karma
    • about / Test runner: Karma

L

  • life cycle, React component
    • about / Component life cycle

M

  • matcher
    • about / Jasmine basics and thinking in BDD
  • matchers
    • about / Understanding matchers
    • custom matchers / Custom matchers
    • built-in matchers / Built-in matchers
    • reference link / More matchers
  • Mixin
    • about / Component state
  • mockup interface, Investment Tracker application
    • about / Thinking in terms of components (Views)
  • module bundler
    • webpack / Module bundler – webpack
  • module pattern
    • about / The module pattern
  • MVC frameworks
    • about / Thinking in terms of components (Views)

N

  • nested describes
    • about / Nested describes
  • NewInvestmentView / Thinking in terms of components (Views)
  • Node.js
    • about / Downloading Jasmine
    • installing / Installing Node.js
  • Node.js server
    • about / Setting up the scenario

O

  • object's functions
    • spying on / Spying on an object's functions
  • Object.seal function
    • about / JavaScript – the bad parts
  • observers
    • Views, integrating with / Integrating Views with observers

P

  • PhantomJS
    • about / Downloading Jasmine, Test runner: Karma
  • production
    • optimizing for / Optimizing for production
  • project
    • adding, to Travis-CI / Adding a project to Travis-CI
  • project setup, React component / Project setup
  • props
    • about / Our first React component, Component attributes (props)

Q

  • quick feedback loop
    • about / Quick feedback loop
    • tests, watching / Watch and run the tests
    • tests, running / Watch and run the tests
    • browser, watching / Watch and update the browser
    • browser, updating / Watch and update the browser

R

  • React component
    • project setup / Project setup
    • about / Our first React component
    • attributes / Component attributes (props)
    • events / Component events
    • state / Component state
    • life cycle / Component life cycle
    • composability / Composing components
  • React Starter Kit Version 0.12.2
    • URL, for downloading / Project setup
  • ref
    • about / Component life cycle
  • return on investment (ROI)
    • about / Nested describes
  • runner
    • about / Downloading Jasmine

S

  • same origin policy (SOP) / Using HTML fixtures
  • scenario, Node.js
    • setting up / Setting up the scenario
    • server, coding / Coding the server
    • server, running / Running the server
  • setup function
    • using / Setup and teardown
  • shared behavior
    • spec, coding with / Coding a spec with shared behavior
  • spec
    • about / Jasmine and behavior-driven development
    • coding, with shared behavior / Coding a spec with shared behavior
  • spec, writing
    • about / Writing the spec
    • asynchronous setups / Asynchronous setups and teardowns
    • asynchronous teardowns / Asynchronous setups and teardowns
  • spec runner, webpack / The spec runner
  • SpecRunner.html file
    • about / Downloading Jasmine
  • spy
    • about / Spying on an object's functions
  • state, React component
    • about / Component state
  • static code analysis
    • JSHint / Static code analysis: JSHint
  • strict equals operator (===)
    • about / The toBe built-in matcher
  • stubs, Jasmine
    • about / Jasmine stubs

T

  • teardown function
    • using / Setup and teardown
  • test-driven development (TDD)
    • about / Jasmine and behavior-driven development
  • test runner
    • Karma / Test runner: Karma
  • test unit
    • about / Jasmine and behavior-driven development
  • toBe built-in matcher
    • about / The toBe built-in matcher
  • toBeCloseTo built-in matcher
    • about / The toBeCloseTo built-in matcher
  • toBeDefined built-in matcher
    • about / The toBeDefined built-in matcher
  • toBeDisabled jQuery matcher
    • about / The toBeDisabled jQuery matcher
  • toBeFalsy matcher
    • about / The toBeTruthy and toBeFalsy matchers
  • toBeFocused jQuery matcher
    • about / The toBeFocused jQuery matcher
  • toBeGreaterThan built-in matcher
    • about / The toBeLessThan and toBeGreaterThan built-in matchers
  • toBeLessThan built-in matcher
    • about / The toBeLessThan and toBeGreaterThan built-in matchers
  • toBeMatchedBy jQuery matcher
    • about / The toBeMatchedBy jQuery matcher
  • toBeNaN built-in matcher
    • about / The toBeUndefined, toBeNull, and toBeNaN built-in matchers
  • toBeNull built-in matcher
    • about / The toBeUndefined, toBeNull, and toBeNaN built-in matchers
  • toBeTruthy matcher
    • about / The toBeTruthy and toBeFalsy matchers
  • toBeUndefined built-in matcher
    • about / The toBeUndefined, toBeNull, and toBeNaN built-in matchers
  • toContain built-in matcher
    • about / The toContain built-in matcher
  • toContainElement jQuery matcher
    • about / The toContainElement jQuery matcher
  • toContainHtml jQuery matcher
    • about / The toContainHtml jQuery matcher
  • toEqual built-in matcher
    • about / The toEqual built-in matcher
  • toHaveAttr jQuery matcher
    • about / The toHaveAttr jQuery matcher
  • toHaveValue jQuery matcher
    • about / The toHaveValue jQuery matcher
  • toMatch built-in matcher
    • about / The toMatch built-in matcher
  • toThrow built-in matcher
    • about / The toThrow built-in matcher
  • Travis-CI
    • URL / Continuous integration – Travis-CI, Adding a project to Travis-CI
    • project, adding to / Adding a project to Travis-CI
    • project, setting up / Project setup

U

  • user stories
    • about / Jasmine and behavior-driven development

V

  • Views
    • about / Thinking in terms of components (Views)
    • integrating, with observers / Integrating Views with observers
    • testing, with jQuery matchers / Testing Views with jQuery matchers
  • Virtual DOM
    • about / The Virtual DOM

W

  • webpack
    • about / Module bundler – webpack, Managing dependencies with NPM
    • module definition / Module definition
    • configuring / Webpack configuration
    • spec runner / The spec runner
    • module, testing / Testing a module
  • webpack project setup
    • about / Webpack project setup
    • dependencies, managing with NPM / Managing dependencies with NPM