awesome-repositories.com
Blog
MCP
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektMCP-ServerÜber unsRanking-MethodikPresse
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
sapegin avatar

sapegin/jest-cheat-sheet

0
View on GitHub↗
5,428 Stars·704 Forks·CC0-1.0·16 Aufrufe

Jest Cheat Sheet

Dieses Projekt ist ein umfassendes Referenzhandbuch und Cheat Sheet für das Jest-Test-Framework. Es bietet technische Dokumentation und Syntaxbeispiele für das Schreiben von JavaScript-Unit-Tests mit Fokus auf Assertions, Mocking-Strategien und die Konfiguration von Test-Suites.

Die Ressource beschreibt spezifische Methoden für die Abhängigkeitsisolierung und das Mocking, einschließlich der Verwendung von Fake-Timern, Ersetzungen auf Modulebene und der Verifizierung von Funktionsaufrufen. Es behandelt zudem spezialisierte Workflows wie Snapshot-Testing, um Regressionen durch Vergleiche serialisierter Ausgaben zu erkennen.

Der Leitfaden adressiert darüber hinaus asynchrone Testmuster, datengesteuertes Testen mittels parametrisierter Injektion sowie die Organisation von Test-Suites durch Lifecycle-Setup- und Teardown-Prozeduren. Es enthält Anweisungen zur Validierung von Datenwerten, zur Verifizierung der Ausnahmebehandlung und zur Filterung der Testausführung.

Features

  • Testing Framework Cheat Sheets - Serves as a comprehensive reference and cheat sheet for writing and running test suites with Jest.
  • Cheat Sheets - Acts as a concise reference guide for Jest assertions, mocking, and test suite configuration.
  • Asynchronous Logic Validation - Guides users on verifying promises and asynchronous patterns to ensure assertions execute correctly.
  • Dependency Mocking - Provides detailed strategies for isolating code by substituting real modules and functions with mocks.
  • Fake Timers - Provides techniques for replacing native clocks with fake timers to execute delayed logic synchronously.
  • Asynchronous Test Handling - Offers a comprehensive guide to verifying promises and time-based logic using asynchronous test patterns.
  • Dependency Mocking - Provides detailed examples of substituting real module dependencies with programmable mock implementations.
  • Timer Mocks - Shows how to control native timer functions to write synchronous tests for time-dependent logic.
  • Value Equality Assertions - Offers a reference for validating data values using strict equality, numeric ranges, and string patterns.
  • Exception Assertions - Provides syntax for asserting that functions throw specific errors or match expected exception messages.
  • Unit Testing - Provides a collection of syntax examples and best practices for writing isolated unit tests in JavaScript.
  • Method Interception Spies - Details how to use spies to track object method calls, getters, and setters without altering original behavior.
  • Test Suite Organization - Details the organization of test suites using grouping and lifecycle setup and teardown procedures.
  • Call-Stack Interceptors - Details how to capture method invocations and arguments using spy functions to verify behavior.
  • Data-Driven Testing - Demonstrates how to use parameterized injection to execute a single test template against multiple input sets.
  • Function Call Tracking - Shows how to track function invocations, count calls, and inspect arguments passed to mocks.
  • Mock State Resetting - Details how to clear internal call history and restore original function implementations between tests.
  • Test Parameterization - Demonstrates how to run the same test logic against multiple data sets using parameterized injection.
  • Mock Behavior Configuration - Explains how to define return values and sequential responses for mock functions to simulate dependency outcomes.
  • Module Registry Resets - Explains how to flush the cached module registry to prevent state leakage between tests.
  • Snapshot Testing - Guides the use of serialized output baselines to detect unexpected changes in components or data.
  • Snapshot Diffing - Provides instructions for comparing serialized output snapshots to detect regressions via string diffing.
  • Mocking and Assertion References - Provides a technical resource for implementing fake timers, module mocks, and data validation.
  • Asynchronous Assertions - Provides guidance on using assertions designed to handle the asynchronous lifecycle and prevent tests from finishing prematurely.
  • Test Execution Filtering - Explains how to isolate or exclude specific tests from a run to focus on particular features.
  • Front End Development - Quick reference for Jest testing framework syntax.
  • Resources and Guides - Quick reference guide for common testing patterns and syntax.

Star-Verlauf

Star-Verlauf für sapegin/jest-cheat-sheetStar-Verlauf für sapegin/jest-cheat-sheet

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Jest Cheat Sheet

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Jest Cheat Sheet.
  • thomhurst/tunitAvatar von thomhurst

    thomhurst/TUnit

    3,744Auf GitHub ansehen↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    Auf GitHub ansehen↗3,744
  • substack/tapeAvatar von substack

    substack/tape

    5,800Auf GitHub ansehen↗

    Tape is a JavaScript testing framework and assertion library that serves as a test runner for Node.js and browser environments. It implements the Test Anything Protocol to provide a standardized, machine-readable format for test results. The project functions as a cross-environment test harness, allowing the same test suites to be executed across both server-side and client-side environments while maintaining a consistent output protocol. Its capabilities include validating value equality and truthiness, verifying exception handling, and coordinating asynchronous workflows. The framework als

    JavaScript
    Auf GitHub ansehen↗5,800
  • sinonjs/sinonAvatar von sinonjs

    sinonjs/sinon

    9,753Auf GitHub ansehen↗

    Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit testing. It provides a collection of spies, stubs, and mocks that replace real function implementations and object methods with controlled substitutes. The project includes a specialized fake timer library for overriding the system clock, allowing the simulation of time progression to trigger timeouts and intervals without waiting for real-time delays. It also features a test sandbox mechanism to group multiple fakes together, ensuring the original state is restored between tes

    JavaScript
    Auf GitHub ansehen↗9,753
  • jestjs/jestAvatar von jestjs

    jestjs/jest

    45,448Auf GitHub ansehen↗

    Jest is a JavaScript testing framework designed for writing and running automated test suites to verify the correctness of JavaScript and TypeScript code. It functions as a comprehensive toolset that integrates a test runner, a mocking and spying library, a snapshot testing tool, and a code coverage tool. The framework distinguishes itself through snapshot testing, which records the serialized state of data structures to detect regressions in future executions. It also includes a mocking and spying library for simulating external dependencies and tracking function calls to isolate code during

    TypeScripteasyexpectationfacebook
    Auf GitHub ansehen↗45,448
Alle 30 Alternativen zu Jest Cheat Sheet anzeigen→

Häufig gestellte Fragen

Was macht sapegin/jest-cheat-sheet?

Dieses Projekt ist ein umfassendes Referenzhandbuch und Cheat Sheet für das Jest-Test-Framework. Es bietet technische Dokumentation und Syntaxbeispiele für das Schreiben von JavaScript-Unit-Tests mit Fokus auf Assertions, Mocking-Strategien und die Konfiguration von Test-Suites.

Was sind die Hauptfunktionen von sapegin/jest-cheat-sheet?

Die Hauptfunktionen von sapegin/jest-cheat-sheet sind: Testing Framework Cheat Sheets, Cheat Sheets, Asynchronous Logic Validation, Dependency Mocking, Fake Timers, Asynchronous Test Handling, Timer Mocks, Value Equality Assertions.

Welche Open-Source-Alternativen gibt es zu sapegin/jest-cheat-sheet?

Open-Source-Alternativen zu sapegin/jest-cheat-sheet sind unter anderem: thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… substack/tape — Tape is a JavaScript testing framework and assertion library that serves as a test runner for Node.js and browser… sinonjs/sinon — Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit… jestjs/jest — Jest is a JavaScript testing framework designed for writing and running automated test suites to verify the… codeception/codeception — Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit,… jasmine/jasmine — Jasmine is a JavaScript testing framework and test runner designed for behavior-driven development. It provides a…

Kuratierte Suchen mit Jest Cheat Sheet

Handverlesene Sammlungen, in denen Jest Cheat Sheet vorkommt.
  • Quick-Reference-Sheets für Entwickler-Tools