anonpenguin f3d5096d1c feat: Add migration guide and documentation test runner
- Introduced a comprehensive migration guide for DebrosFramework 0.5.x, detailing breaking changes, upgrade procedures, and best practices.
- Implemented a documentation test runner to validate code examples in documentation files, ensuring accuracy and consistency with the current implementation.
- Enhanced BlogAPIServer to handle potential null values in API responses, improving robustness and error handling.
2025-07-12 14:22:21 +03:00
..

Tests

This directory contains the test suite for the Debros Network framework.

Structure

tests/
├── unit/                    # Unit tests for individual components
│   ├── core/               # Core framework components
│   ├── models/             # Model-related functionality  
│   ├── relationships/      # Relationship management
│   ├── sharding/          # Data sharding functionality
│   ├── decorators/        # Decorator functionality
│   └── migrations/        # Database migrations
├── real-integration/       # Real integration tests with Docker
│   └── blog-scenario/     # Complete blog application scenario
├── mocks/                 # Mock implementations for testing
└── setup.ts              # Test setup and configuration

Running Tests

Unit Tests

Run all unit tests (fast, uses mocks):

pnpm run test:unit

Real Integration Tests

Run full integration tests with Docker (slower, uses real services):

pnpm run test:real

Test Categories

  • Unit Tests: Fast, isolated tests that use mocks for external dependencies
  • Real Integration Tests: End-to-end tests that spin up actual IPFS nodes and OrbitDB instances using Docker

Coverage

Unit tests provide code coverage reports in the coverage/ directory after running.