Skip to content

OBS Bible Stream Verses v2.1.0 - Testing Suite & Code Improvements

Choose a tag to compare

@boraita boraita released this 13 Oct 11:15
· 15 commits to main since this release
1d1d00e

📖 OBS Bible Stream Verses v2.1.0

🎯 Overview

This release focuses on code quality improvements, comprehensive testing infrastructure, and developer experience enhancements. The plugin now includes a professional testing suite and refactored codebase for better maintainability.

✨ What's New

🧪 Testing Suite

A comprehensive testing system has been added to ensure code quality and prevent regressions:

  • Algorithm Testing (testAlgorithm.js)

    • Tests 20 different Bible verses for consistency
    • Validates font size differentiation by text length
    • Supports --quick and --verbose modes
    • 100% consistency validation across all verses
  • Configuration Testing (testBibleSelection.js)

    • Validates all 6 Bible versions are properly configured
    • Ensures correct title construction
    • Verifies compatibility with core functionality
  • Snapshot Testing (testSnapshot.js)

    • MD5-based snapshot validation
    • Detects unintended algorithm changes
    • Tracks configuration integrity
    • --update flag for intentional changes

📚 RVR60 Bible Included

  • Reina-Valera 1960 now included in the repository as a reference Bible
  • Provides immediate functionality for testing and demonstration
  • Public domain Spanish translation
  • Users can still add their own Bible versions following the documentation

🔧 Code Improvements

  • Centralized Configuration: Refactored sendMessage.js to use BIBLE_MAP from bibleConfig.js
  • Bug Fixes: Fixed getBibleMap() function returning incorrect name property
  • DRY Principles: Eliminated redundant code and improved maintainability
  • Consolidated Tests: Reduced from 7+ test files to 3 essential, focused tests

📖 Documentation

  • New TESTING.md with comprehensive testing guidelines
  • Updated README.md with RVR60 reference information
  • Improved testing documentation in testing/README.md
  • All test content and comments translated to English

🏗️ Infrastructure

  • Modified .gitignore to include RVR60.sqlite
  • Updated .npmignore for cleaner distribution packages
  • All tests provide proper exit codes for CI/CD integration
  • Release packages now exclude .md files (production-ready)

🔄 Changes & Fixes

Changed

  • Bible Configuration: Updated Kadosh display name for clarity
  • Test Data: All verse references translated to English
  • Code Structure: Improved organization and naming conventions

Removed

  • Deleted redundant test files: testDirecto.js, testAvanzado.js, testFinal.js
  • Eliminated duplicate and unnecessary testing code

Fixed

  • Bug in getBibleMap() where it returned key instead of BIBLE_CONFIG[key].name
  • Inconsistent naming conventions across test files

📦 Installation

For Users (OBS Studio)

  1. Download the ZIP file below (obs-bible-stream-verses-v2.1.0.zip)
  2. Extract to a folder on your computer
  3. In OBS Studio:
    • Add a Custom Browser Dock: file:///path/to/dist/panel.html
    • Add a Browser Source: file:///path/to/dist/browser.html
    • Set Browser Source dimensions: 1920x1080 (or your stream resolution)

For Developers

# Clone the repository
git clone https://github.com/boraita/obs-bible-plugin.git
cd obs-bible-plugin

# Install dependencies
pnpm install

# Development with hot reload
pnpm start

# Run tests
node [testAlgorithm.js](http://_vscodecontentref_/0) --quick
node [testBibleSelection.js](http://_vscodecontentref_/1)
node [testSnapshot.js](http://_vscodecontentref_/2)

# Production build
pnpm build

# Create release package
pnpm release