瀏覽代碼

fix error

yohei0125 4 年之前
父節點
當前提交
6b080aa428
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      packages/app/test/integration/service/pagev5.test.ts

+ 6 - 0
packages/app/test/integration/service/pagev5.test.ts

@@ -70,6 +70,12 @@ describe('PageService page operations with only public pages', () => {
     /*
      * Rename
      */
+    // delete root page if any created by other test file
+    const pages = await Page.find({ path: '/' });
+    if (pages.length > 0) {
+      await Page.deleteOne({ path: '/' });
+    }
+    // then create new root page
     rootPage = await Page.create('/', 'body', dummyUser1._id, {});
 
     // Create Pages