Skip to content

Commit 1fae37f

Browse files
test(docs): assert getText calls documents.get with refined args
Locks in the new behavior so a future regression that drops the narrowed field mask or the PREVIEW_WITHOUT_SUGGESTIONS view mode is caught at PR time rather than only via API errors against real Google Docs.
1 parent c5d03f5 commit 1fae37f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

workspace-server/src/__tests__/services/DocsService.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,12 @@ describe('DocsService', () => {
465465

466466
const result = await docsService.getText({ documentId: 'test-doc-id' });
467467

468+
expect(mockDocsAPI.documents.get).toHaveBeenCalledWith({
469+
documentId: 'test-doc-id',
470+
fields: `title,${TABS_FIELD_MASK}`,
471+
includeTabsContent: true,
472+
suggestionsViewMode: 'PREVIEW_WITHOUT_SUGGESTIONS',
473+
});
468474
expect(result.content[0].text).toBe('Hello World\n');
469475
});
470476

0 commit comments

Comments
 (0)