test(page-templates): fix TransclusionService spec constructor arity
The transclusion specs predated two added constructor params, so they failed to compile (TS2554: expected 11 args, got 10) and the suites couldn't run. Add the missing mock args: workspaceRepo (param 11) in the lookup/access specs, and pageTemplateReferencesRepo (param 4, which had shifted pageRepo into the wrong slot) in the unsync-html-embed spec. All three suites now compile and pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,7 @@ describe('TransclusionService — template access core (real filter)', () => {
|
||||
{} as any, // attachmentRepo
|
||||
{} as any, // storageService
|
||||
{} as any, // pageAccessService
|
||||
{} as any, // workspaceRepo
|
||||
);
|
||||
|
||||
return { service, db, pageRepo, spaceMemberRepo, pagePermissionRepo };
|
||||
@@ -216,7 +217,8 @@ describe('TransclusionService.syncPageTemplateReferences — workspace scoping',
|
||||
{} as any,
|
||||
{} as any,
|
||||
{} as any,
|
||||
{} as any,
|
||||
{} as any, // pageAccessService
|
||||
{} as any, // workspaceRepo
|
||||
);
|
||||
|
||||
return { service, insertMany, pageTemplateReferencesRepo };
|
||||
|
||||
@@ -34,6 +34,7 @@ describe('TransclusionService.lookupTemplate (access mapping)', () => {
|
||||
{} as any, // attachmentRepo
|
||||
{} as any, // storageService
|
||||
{} as any, // pageAccessService
|
||||
{} as any, // workspaceRepo
|
||||
);
|
||||
|
||||
jest
|
||||
|
||||
@@ -56,6 +56,7 @@ function buildService(featureEnabled = true) {
|
||||
{} as any, // db (unused on this path)
|
||||
pageTransclusionsRepo as any,
|
||||
pageTransclusionReferencesRepo as any,
|
||||
{} as any, // pageTemplateReferencesRepo (unused on this path)
|
||||
pageRepo as any,
|
||||
{} as any, // pagePermissionRepo (unused)
|
||||
{} as any, // spaceMemberRepo (unused)
|
||||
|
||||
Reference in New Issue
Block a user