Explorar o código

remvoe and refactor code

yohei0125 %!s(int64=3) %!d(string=hai) anos
pai
achega
5f39e67b45
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  1. 3 4
      packages/app/test/integration/service/v5.page.test.ts

+ 3 - 4
packages/app/test/integration/service/v5.page.test.ts

@@ -403,14 +403,13 @@ describe('Test page service methods', () => {
     });
     });
 
 
     test('Missing property(toPath) for PageOperation should throw error', async() => {
     test('Missing property(toPath) for PageOperation should throw error', async() => {
-      // path
-      const _path1 = '/resume_rename_7';
       // page
       // page
+      const _path1 = '/resume_rename_7';
       const _page1 = await Page.findOne({ path: _path1 });
       const _page1 = await Page.findOne({ path: _path1 });
+      expect(_page1).toBeTruthy();
+
       // page operation
       // page operation
       const _pageOperation = await PageOperation.findOne({ 'page._id': _page1._id, actionType: PageActionType.Rename, actionStage: PageActionStage.Sub });
       const _pageOperation = await PageOperation.findOne({ 'page._id': _page1._id, actionType: PageActionType.Rename, actionStage: PageActionStage.Sub });
-
-      expect(_page1).toBeTruthy();
       expect(_pageOperation).toBeTruthy();
       expect(_pageOperation).toBeTruthy();
 
 
       const promise = resumeRenameSubOperation(_page1);
       const promise = resumeRenameSubOperation(_page1);