File tree Expand file tree Collapse file tree 3 files changed +3
-25
lines changed
Expand file tree Collapse file tree 3 files changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ export {
7676 mockDrizzleOrm ,
7777 mockHybridAuth ,
7878 mockKnowledgeSchemas ,
79- mockUuid ,
8079 requestUtilsMock ,
8180 setupCommonApiMocks ,
8281 setupGlobalFetchMock ,
Original file line number Diff line number Diff line change @@ -82,5 +82,3 @@ export {
8282export { clearStorageMocks , createMockStorage , setupGlobalStorageMocks } from './storage.mock'
8383// Telemetry mocks
8484export { telemetryMock } from './telemetry.mock'
85- // UUID mocks
86- export { mockGenerateId , mockUuid } from './uuid.mock'
Original file line number Diff line number Diff line change 11/**
2- * UUID mock utilities for testing .
2+ * UUID mock utilities — intentionally empty .
33 *
4- * @deprecated Prefer `vi.hoisted()` + `vi. mock(' @/lib/core/utils/uuid', ...) ` directly
5- * in test files. These helpers use `vi.doMock` which violates project testing rules.
4+ * All test files should mock ` @/lib/core/utils/uuid` directly using
5+ * `vi.hoisted()` + `vi.mock()` per project testing rules.
66 */
7- import { vi } from 'vitest'
8-
9- /**
10- * @deprecated Use `vi.hoisted()` + `vi.mock('@/lib/core/utils/uuid', ...)` instead.
11- */
12- export function mockGenerateId ( mockValue = 'test-uuid' ) {
13- vi . doMock ( '@/lib/core/utils/uuid' , ( ) => ( {
14- generateId : vi . fn ( ) . mockReturnValue ( mockValue ) ,
15- generateShortId : vi . fn ( ) . mockImplementation ( ( size = 21 ) => mockValue . slice ( 0 , size ) ) ,
16- isValidUuid : vi
17- . fn ( )
18- . mockImplementation ( ( v : string ) =>
19- / ^ [ 0 - 9 a - f ] { 8 } - [ 0 - 9 a - f ] { 4 } - [ 0 - 9 a - f ] { 4 } - [ 0 - 9 a - f ] { 4 } - [ 0 - 9 a - f ] { 12 } $ / i. test ( v )
20- ) ,
21- } ) )
22- }
23-
24- /** @deprecated Use `mockGenerateId` instead. */
25- export const mockUuid = mockGenerateId
You can’t perform that action at this time.
0 commit comments