ryoji-s 2 лет назад
Родитель
Сommit
b476ee8292

+ 1 - 12
packages/core/src/utils/page-path-utils/index.spec.ts

@@ -1,18 +1,7 @@
 import {
-  isMovablePage, isTopPage, isUsersProtectedPages, convertToNewAffiliationPath, isCreatablePage, omitDuplicateAreaPathFromPaths, getUsernameByPath,
+  isTopPage, isUsersProtectedPages, convertToNewAffiliationPath, isCreatablePage, omitDuplicateAreaPathFromPaths, getUsernameByPath,
 } from './index';
 
-describe.concurrent('isMovablePage test', () => {
-  test('should decide movable or not', () => {
-    expect(isMovablePage('/')).toBeFalsy();
-    expect(isMovablePage('/hoge')).toBeTruthy();
-    expect(isMovablePage('/user')).toBeFalsy();
-    expect(isMovablePage('/user/xxx')).toBeFalsy();
-    expect(isMovablePage('/user/xxx123')).toBeFalsy();
-    expect(isMovablePage('/user/xxx/hoge')).toBeTruthy();
-  });
-});
-
 describe.concurrent('isTopPage test', () => {
   test('should decide deletable or not', () => {
     expect(isTopPage('/')).toBeTruthy();

+ 0 - 8
packages/core/src/utils/page-path-utils/index.ts

@@ -44,14 +44,6 @@ export const isUsersProtectedPages = (path: string): boolean => {
   return isUsersTopPage(path) || isUsersHomepage(path);
 };
 
-/**
- * Whether path is movable
- * @param path
- */
-export const isMovablePage = (path: string): boolean => {
-  return !isTopPage(path) && !isUsersProtectedPages(path);
-};
-
 /**
  * Whether path belongs to the user page
  * @param path