Files
outline/server/test/setupMocks.js
T
Tom Moor a54e66e19a chore: Test improvements (#10945)
* Lazy queues, correctly closing Redis and server

* feedback

* fix: Tests not correctly split across matrix
2025-12-17 23:15:55 -05:00

13 lines
516 B
JavaScript

// This file runs before the test environment is set up to ensure mocks are registered early
// It prevents real Redis clients from being initialized during module imports
// Mock ioredis with ioredis-mock before any imports
jest.mock("ioredis", () => require("ioredis-mock"));
// Mock other Redis-dependent modules
jest.mock("@server/utils/MutexLock");
jest.mock("@server/utils/CacheHelper");
// Mock AWS SDK signature module to prevent aws_logger open handle
jest.mock("@aws-sdk/signature-v4-crt", () => ({}));