Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

kastorcode/javascript-testing-jsexpert

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

🚀 Getting Started

Prerequisites

  • Node.js (version 18 or higher)
  • npm or yarn package manager

Installation

  1. Clone this repository:
git clone https://github.com/kastorcode/javascript-testing-jsexpert.git
cd javascript-testing-jsexpert
  1. Install dependencies for each module as needed:
cd [module-name]
npm install
# or
yarn install

🧪 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/>

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.