Jelajahi Sumber

fix mock return value

yohei0125 4 tahun lalu
induk
melakukan
ba2db16ae1
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      packages/app/test/integration/service/pagev5.test.ts

+ 1 - 1
packages/app/test/integration/service/pagev5.test.ts

@@ -466,7 +466,7 @@ describe('PageService page operations with only public pages', () => {
 
     const duplicate = async(page, newPagePath, user, isRecursively) => {
       // mock return value
-      const mockedResumableDuplicateDescendants = jest.spyOn(crowi.pageService, 'resumableDuplicateDescendants').mockRejectedValue(null);
+      const mockedResumableDuplicateDescendants = jest.spyOn(crowi.pageService, 'resumableDuplicateDescendants').mockReturnValue(null);
       jest.spyOn(crowi.pageService, 'createAndSendNotifications').mockReturnValue(null);
       const duplicatedPage = await crowi.pageService.duplicate(page, newPagePath, user, isRecursively);