@@ -7,13 +7,15 @@ import { SILENT_REPLY_TOKEN, type PluginRuntime } from "../runtime-api.js";
77import type { StoredConversationReference } from "./conversation-store.js" ;
88const graphUploadMockState = vi . hoisted ( ( ) => ( {
99 uploadAndShareOneDrive : vi . fn ( ) ,
10+ uploadAndShareSharePoint : vi . fn ( ) ,
11+ getDriveItemProperties : vi . fn ( ) ,
1012} ) ) ;
1113
12- vi . mock ( "./graph-upload.js" , async ( ) => {
13- const actual = await vi . importActual < typeof import ( "./graph-upload.js" ) > ( "./graph-upload.js" ) ;
14+ vi . mock ( "./graph-upload.js" , ( ) => {
1415 return {
15- ...actual ,
1616 uploadAndShareOneDrive : graphUploadMockState . uploadAndShareOneDrive ,
17+ uploadAndShareSharePoint : graphUploadMockState . uploadAndShareSharePoint ,
18+ getDriveItemProperties : graphUploadMockState . getDriveItemProperties ,
1719 } ;
1820} ) ;
1921
@@ -115,6 +117,8 @@ describe("msteams messenger", () => {
115117 beforeEach ( ( ) => {
116118 setMSTeamsRuntime ( runtimeStub ) ;
117119 graphUploadMockState . uploadAndShareOneDrive . mockReset ( ) ;
120+ graphUploadMockState . uploadAndShareSharePoint . mockReset ( ) ;
121+ graphUploadMockState . getDriveItemProperties . mockReset ( ) ;
118122 graphUploadMockState . uploadAndShareOneDrive . mockResolvedValue ( {
119123 itemId : "item123" ,
120124 webUrl : "https://onedrive.example.com/item123" ,
0 commit comments