Node.js: Testing and Code Quality

Go to class
Write Review

Free Online Course: Node.js: Testing and Code Quality provided by LinkedIn Learning is a comprehensive online course, which lasts for 4-5 hours worth of material. The course is taught in English and is free of charge. Upon completion of the course, you can receive an e-certificate from LinkedIn Learning. Node.js: Testing and Code Quality is taught by Jon Peck.

Overview
  • Learn how to measure quality, implement testing, and ensure code coverage in your node.js apps.

Syllabus
  • Introduction

    • Cleaning your codebase
    • What you should know
    • Preparing for Node.js development
    • Exercise files
    • Demo setup and tour
    1. Testing and Code Quality Fundamentals
    • What is code quality?
    • Coding conventions and standards
    • Creating and enforcing coding standards
    • Unit, integration, and functional testing
    • Testing frameworks
    • TDD and BDD test specifications
    • Assertions for correctness
    • Challenge: Organize your tests
    • Solution: Organize your tests
    2. Finding Errors with Linting
    • Standardizing with EditorConfig
    • Adding EditorConfig to a project and IDE
    • Comparing JavaScript linters
    • Installing ESLint
    • Configuring ESLint
    • Extending an ESLint shareable config
    • Linting your codebase
    • Fixing code in VSC with ESLint
    • Challenge: Create a shareable ESLint config
    • Solution: Create a shareable ESLint config
    3. Validate Correctness with Unit Testing
    • Survey of Node.js testing frameworks
    • Install Jest in a Node.js project
    • What and where to unit test?
    • Writing your first Jest unit test
    • Running a test suite with Jest
    • Testing asynchronous callbacks with Jest
    • Writing callback test suites with Jest
    • Testing promises with Jest
    • Challenge: Test async/await with Jest
    • Solution: Test async/await with Jest
    4. Replacing and Inspecting Using Spies, Stubs, and Mocks
    • Replacing code with test doubles
    • Mocking functions for test code
    • Writing your first Jest mock
    • Mock an entire module with Jest
    • Mocking module dependencies
    • Spying to observe interactions
    • Challenge: Mock a successful reservation creation
    • Solution: Mock a successful reservation creation
    5. Reporting on Your Entire Codebase
    • Why code coverage matters
    • Measuring code coverage with Jest
    • Functional testing with Jest
    • Test doubles and Express apps
    • Form submissions with SuperTest
    • Fallacies of 100% test coverage
    • Coverage with continuous integration
    • Challenge: Isolate routes for faster tests
    • Solution: Isolate routes for faster tests
    Conclusion
    • Testing and code quality goals
    • Where to go from here?