Skip to content

feat(testing): add isolated Stryker mutation configs and queue worker test suites - #1889

Merged
sublime247 merged 1 commit into
sublime247:mainfrom
ShantelPeters:feature/stryker-mutation-testing
Aug 28, 2026
Merged

feat(testing): add isolated Stryker mutation configs and queue worker test suites#1889
sublime247 merged 1 commit into
sublime247:mainfrom
ShantelPeters:feature/stryker-mutation-testing

Conversation

@ShantelPeters

Copy link
Copy Markdown
Contributor

📌 Overview

This PR resolves SIGBUS worker process failures during StrykerJS mutation testing on Node v24 / macOS Apple Silicon by introducing standalone, isolated Jest configurations (jest.stryker.config.js and jest.stryker.queue.config.js). It also expands unit test coverage for queue worker operations and core services (feeService, transactionService, syncWorker, syncQueue).


🎯 Key Changes

  1. Isolated Jest Configurations for StrykerJS:

    • Added jest.stryker.config.js targeting core services.
    • Added jest.stryker.queue.config.js targeting queue workers.
    • Configured isolatedModules: true and maxWorkers: 1 in ts-jest to disable worker thread spawning during mutation test execution.
    • Removed top-level projects array inheritance to avoid duplicate worker initialization inside Stryker sandboxes.
  2. Expanded Test Suites:

    • src/services/__tests__/feeService.test.ts: Complete unit tests for fee calculation, active configuration retrieval, audit logging, and CRUD operations.
    • src/services/__tests__/transactionService.test.ts: Complete unit tests for transaction lifecycle management.
    • src/tests/queue/syncQueue.test.ts: Edge-case unit tests covering options fallbacks (priority, delay, jobId), optional chaining, and queue health metrics (getSyncQueueStats).
    • src/tests/queue/syncWorker.nats.test.ts & src/tests/queue/syncWorker.test.ts: Test coverage for BullMQ and NATS JetStream sync message handlers.
  3. Type Safety & Tracing Fixes:

    • Explicitly typed Datadog tracing spans in src/queue/syncWorker.ts to ensure compatibility across OpenTelemetry/Datadog interfaces.

🧪 Verification & Results

1. Standalone Jest Test Executions

  • Services Suite: 2 passed, 2 total (30/30 unit tests green)
    npx jest --config jest.stryker.config.js
    

CLOSES #1836

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@ShantelPeters Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@sublime247
sublime247 merged commit 8e9b971 into sublime247:main Aug 28, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing] Add mutation testing suite to verify test quality

2 participants