mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671)
This also gets rid of `Db.collection`, which was another source of circular dependencies.
This commit is contained in:
committed by
GitHub
parent
37dd658dc5
commit
000e76e3b4
@@ -5,13 +5,14 @@ import { v4 as uuid } from 'uuid';
|
||||
import type { Role } from '@db/entities/Role';
|
||||
import { License } from '@/License';
|
||||
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import { randomApiKey } from '../shared/random';
|
||||
import * as utils from '../shared/utils/';
|
||||
import * as testDb from '../shared/testDb';
|
||||
import { getGlobalMemberRole, getGlobalOwnerRole } from '../shared/db/roles';
|
||||
import { createUser, createUserShell } from '../shared/db/users';
|
||||
|
||||
utils.mockInstance(License, {
|
||||
mockInstance(License, {
|
||||
getUsersLimit: jest.fn().mockReturnValue(-1),
|
||||
});
|
||||
|
||||
@@ -216,7 +217,7 @@ describe('With license without quota:users', () => {
|
||||
let authOwnerAgent: SuperAgentTest;
|
||||
|
||||
beforeEach(async () => {
|
||||
utils.mockInstance(License, { getUsersLimit: jest.fn().mockReturnValue(null) });
|
||||
mockInstance(License, { getUsersLimit: jest.fn().mockReturnValue(null) });
|
||||
|
||||
const owner = await createUser({
|
||||
globalRole: globalOwnerRole,
|
||||
|
||||
Reference in New Issue
Block a user