Test-Driven Development for JavaScript

Video description

10+ Hours of Video Instruction

Learn How to Use Test-Driven Development Techniques to Create High-Quality JavaScript Applications

Overview

Test-Driven Development for JavaScript LiveLessons brings you step-by-step knowledge to create high-quality JavaScript applications. The course teaches you how to apply test-driven technologies to create reliable and verifiable JavaScript solutions that are maintainable and adhere to best practices.

JavaScript has become an indispensable language in modern-day computing. Writing JavaScript is relatively straightforward but writing high-quality JavaScript and testing it thoroughly is much harder. Test-Driven Development for JavaScript LiveLessons uses Jest for defining and running JavaScript and TypeScript tests. It also covers how to use Jest to test many popular types of JavaScript solutions, including Node.js applications on the server and React and Angular solutions at the client.

Taught by experienced trainer and author, Andy Olsen, this course is your complete guide to mastering writing high-quality JavaScript. The course has hands-on demos throughout the lessons for better understanding of the topic areas.

The resource files for this LiveLesson can be downloaded from https://informit.core.ecollege.net/store/test-driven-development-for-javascript-livelessons-9780137864706.

About the Instructor

Andy Olsen is a freelance consultant, instructor, and developer with more than 30 years of experience in IT. Andy began his professional career as a C/C++ developer and morphed into Java, C#, and other languages as the years passed by. He is actively involved in a wide range of technologies including full stack development, cloud native applications, data science, and more. He is passionate about technology education and runs training courses around the world across diverse market sectors.

You can find Andy here:
https://www.linkedin.com/in/andy-olsen-481496/
http://olsensoft.com/

Skill Level
  • Intermediate
Learn How To
  • Set up a testing environment for JavaScript and TypeScript
  • Organize tests into suites
  • Write effective tests for the user interface and for server-side code
  • Apply mocking techniques effectively
  • Test React applications
  • Test Angular applications
Who Should Take This Course
  • Individuals implementing client-side JavaScript web clients or server-side Node.js applications
Course Requirements
  • JavaScript programming experience, either creating client-side web applications or server-side Node.js applications
About Pearson Video Training

Pearson publishes expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. These professional and personal technology videos feature world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, Pearson IT Certification, Sams, and Que Topics include: IT Certification, Network Security, Cisco Technology, Programming, Web Development, Mobile Development, and more. Learn more about Pearson Video training at http://www.informit.com/video.

Table of contents

  1. Introduction
    1. Test-Driven Development for JavaScript: Introduction
  2. Lesson 1: Getting Started with JavaScript Testing
    1. Learning objectives
    2. 1.1 Overview of testing in JavaScript
    3. 1.2 Getting started with Jest
    4. 1.3 Writing and running a test
    5. 1.4 Organizing tests into suites
    6. 1.5 Using ECMAScript modules
  3. Lesson 2: Using Jest Matchers Effectively
    1. Learning objectives
    2. 2.1 Overview of Jest matchers
    3. 2.2 Testing for equality
    4. 2.3 Testing for range
    5. 2.4 Testing for null, undefined, or NaN
    6. 2.5 Testing for truth or falsehood
    7. 2.6 Testing for object properties
    8. 2.7 Testing for collections
    9. 2.8 Testing for errors
    10. 2.9 Defining and using a simple custom matcher
    11. 2.10 Defining and using a parameterized custom matcher
  4. Lesson 3: Writing Effective Tests
    1. Learning objectives
    2. 3.1 Performing common setup and teardown operations
    3. 3.2 Defining parameterized tests
    4. 3.3 Testing for errors
    5. 3.4 Testing TypeScript code
    6. 3.5 Gathering test coverage information
  5. Lesson 4: Testing Asynchronous Operations
    1. Learning objectives
    2. 4.1 Testing callback functions
    3. 4.2 Testing errors from callback functions
    4. 4.3 Specifying a timeout for tests
    5. 4.4 Understanding promises
    6. 4.5 Testing promises
    7. 4.6 Using the async and await keywords
    8. 4.7 Getting started with RxJs
    9. 4.8 Going further with RxJs
  6. Lesson 5: Mocking
    1. Learning objectives
    2. 5.1 Creating and using a mock function
    3. 5.2 Understanding the .mock property
    4. 5.3 Using mock functions to mock an API
    5. 5.4 Mocking modules
    6. 5.5 Mocking promises
    7. 5.6 Mocking REST calls
  7. Lesson 6: Additional Mocking Techniques
    1. Learning objectives
    2. 6.1 Spying on functions
    3. 6.2 Defining a mock implementation for a spy
    4. 6.3 Mocking timers
    5. 6.4 Mocking timers - additional techniques
    6. 6.5 Introduction to ES6 classes
    7. 6.6 Defining automatic mocks for ES6 classes
    8. 6.7 Defining manual mocks for ES6 classes
  8. Lesson 7: Effective Test-Driven Development (TDD)
    1. Learning objectives
    2. 7.1 Overview of TDD
    3. 7.2 TDD walkthrough
    4. 7.3 Refactoring
    5. 7.4 Refactoring with inheritance
    6. 7.5 Additional techniques
  9. Lesson 8: Testing the User Interface
    1. Learning objectives
    2. 8.1 DOM essentials
    3. 8.2 Introduction to JSDOM
    4. 8.3 Accessing content using JSDOM
    5. 8.4 Loading an HTML file in a test
    6. 8.5 Testing JavaScript code that accesses HTML content
    7. 8.6 Testing event handlers
    8. 8.7 Introduction to Testing Library
    9. 8.8 Types of query available in Testing Library
    10. 8.9 A closer look at the query API in Testing Library
    11. 8.10 Using companion libraries with Testing Library
  10. Lesson 9: Getting Started with Testing React Applications
    1. Learning objectives
    2. 9.1 Getting started with React
    3. 9.2 Creating a simple React app
    4. 9.3 Creating a complete React app
    5. 9.4 Understanding React components
    6. 9.5 Testing a React app
  11. Lesson 10: Going Further with Testing React Applications
    1. Learning objectives
    2. 10.1 Sample React application
    3. 10.2 Introduction to Enzyme
    4. 10.3 Shallow rendering in Enzyme
    5. 10.4 Full DOM rendering in Enzyme
    6. 10.5 Static rendering in Enzyme
    7. 10.6 Simulating events in Enzyme
    8. 10.7 Testing React state in Enzyme
    9. 10.8 Testing React effect hooks in Enzyme
    10. 10.9 Using React Testing Library
  12. Lesson 11: Getting Started with Testing Angular Applications
    1. Learning objectives
    2. 11.1 Getting started with Angular
    3. 11.2 Creating an Angular application
    4. 11.3 Defining tests for a simple class
    5. 11.4 Defining comprehensive tests for a class
    6. 11.5 Understanding Angular components
    7. 11.6 Testing a component
    8. 11.7 Going further with component testing
  13. Lesson 12: Going Further with Testing Angular Applications
    1. Learning objectives
    2. 12.1 Testing a component that has state and functions
    3. 12.2 Component DOM testing
    4. 12.3 Testing a component that has child components
    5. 12.4 Defining a component that has inputs and outputs
    6. 12.5 Testing a component that has inputs and outputs
    7. 12.6 Testing the parent of a component that has inputs and outputs
    8. 12.7 Defining a service
    9. 12.8 Testing a service
    10. 12.9 Defining a pipe
    11. 12.10 Testing a pipe
  14. Summary
    1. Test-Driven Development for JavaScript: Summary

Product information

  • Title: Test-Driven Development for JavaScript
  • Author(s): Andy Olsen
  • Release date: July 2022
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 0137864590