Skip to content

Files

Latest commit

 

History

History

01-javascript-testing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

JavaScript Testing - JS Expert

👨‍💻 Developed by Matheus Ramalho de Oliveira
🏗️ Brazilian Software Engineer
✉️ kastorcode@gmail.com
🦫 LinkedInInstagram


This repository contains a comprehensive collection of JavaScript testing practices and examples, covering various testing methodologies and techniques. The project is structured to help developers understand and implement different testing approaches in JavaScript applications.


🗂️ Project Structure

The project is organized into several modules, each focusing on specific testing concepts:

  • 01-mocks: Examples and implementations of mocking in JavaScript tests
  • 02-stubs: Demonstration of stub usage in testing
  • 03-spies: Implementation of test spies and their applications
  • 04-coverage-e2e: End-to-end testing examples with coverage reporting
  • 05-tdd-project: A simple project built using Test-Driven Development (TDD) principles

🧪 Running Tests

Each module contains its own test suite. To run tests for a specific module:

cd [module-name]

npm test
# or
yarn test

npm test:cov
# or
yarn test:cov

📚 Learning Objectives

  • Understanding and implementing different types of test doubles (Mocks, Stubs, Spies)
  • Writing effective unit tests
  • Implementing end-to-end testing
  • Following Test-Driven Development practices
  • Measuring and improving test coverage
  • Best practices in JavaScript testing

<kastor.code/>