mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
14 lines
473 B
TypeScript
14 lines
473 B
TypeScript
import { Container } from '@n8n/di';
|
|
|
|
import { DataStoreSizeValidator } from '../data-store-size-validator.service';
|
|
|
|
export function mockDataStoreSizeValidator() {
|
|
const sizeValidator = Container.get(DataStoreSizeValidator);
|
|
jest.spyOn(sizeValidator, 'validateSize').mockResolvedValue();
|
|
jest.spyOn(sizeValidator, 'getCachedSizeData').mockResolvedValue({
|
|
totalBytes: 50 * 1024 * 1024, // 50MB - under the default limit
|
|
dataTables: {},
|
|
});
|
|
return sizeValidator;
|
|
}
|