YoVDO

JavaScript: Test-Driven Development (ES6)

Offered By: LinkedIn Learning

Tags

Javascript Courses Unit Testing Courses Test-Driven Development Courses Integration Testing Courses End-to-end testing Courses

Course Description

Overview

Create a more stable and quality-focused development process through test-driven development. Learn foundational techniques for unit and integration tests with JavaScript ES6.

Syllabus

Introduction
  • Intro video
  • What you should know
  • What this course covers
  • Software installation
1. Test-Driven Development (TDD) Basics
  • What is TDD?
  • Advantages of TDD
  • Disadvantages of TDD
  • The basic TDD cycle
  • Writing effective tests
  • The three different types of tests
2. Writing Unit Tests
  • The purpose of unit testing
  • JavaScript frameworks for unit testing
  • Writing and running basic tests
  • Testing basic functions
  • Testing asynchronous functions
  • Modifying existing functionality
  • To mock or not to mock?
  • Challenge: Given criteria, write unit tests
  • Solution: Given criteria, write unit tests
3. Writing Integration Tests
  • Introduction to integration testing
  • How do integration tests fit into TDD?
  • Test doubles
  • When shouldn't I use test doubles?
  • The two categories of integration tests
  • JavaScript libraries For integration testing
4. Writing End-to-End Tests
  • Integration testing in practice
  • Testing Node servers with SuperTest
  • Testing an endpoint: The basic approach
  • Creating a Mocha setup file
5. Improving Your TDD Workflow
  • Testing database communication: Basic setup
  • Database setup and teardown in tests
  • Ignoring object properties in Mocha
  • Using environment variables in testing
  • Creating test helpers
  • Resetting the database between tests
6. A Real-World Example
  • Creating test-doubles with Sinon
  • Testing a Node endpoint with SuperTest
  • Implementing a server endpoint
  • Testing a server's error path
  • Challenge: Testing "Not Found"
  • Solution: Testing "Not Found"
7. Running Tests
  • Run tests automatically
  • Checking test coverage with NYC
Conclusion
  • Next steps

Taught by

Shaun Wassell

Related Courses

DevOps Testing
Microsoft via edX
Software Testing
NPTEL via Swayam
Introduction to Software Testing
University of Minnesota via Coursera
Java Spring Boot Application Software Testing
Coursera Project Network via Coursera
Java from Zero to First Job, Practical Guide, 2000+ examples
Udemy