Futa Arai 7 месяцев назад
Родитель
Сommit
7f76864a33

+ 0 - 63
packages/remark-attachment-refs/src/client/stores/refs.spec.ts

@@ -234,33 +234,6 @@ describe('useSWRxRef and useSWRxRefs integration tests', () => {
 
       axiosGetSpy.mockRestore();
     });
-
-    it('should handle ObjectId-based file reference correctly', async () => {
-      const axiosGetSpy = setupAxiosSpy();
-
-      const { result } = renderHook(() =>
-        useSWRxRef('/test-page', '507f1f77bcf86cd799439011', false),
-      );
-
-      await waitFor(() => expect(result.current.data).toBeDefined(), {
-        timeout: 5000,
-      });
-
-      expect(axiosGetSpy).toHaveBeenCalledWith(
-        '/_api/attachment-refs/ref',
-        expect.objectContaining({
-          params: expect.objectContaining({
-            pagePath: '/test-page',
-            fileNameOrId: '507f1f77bcf86cd799439011',
-          }),
-        }),
-      );
-
-      expect(result.current.data).toBeDefined();
-      expect(result.current.error).toBeUndefined();
-
-      axiosGetSpy.mockRestore();
-    });
   });
 
   describe('useSWRxRefs', () => {
@@ -319,41 +292,5 @@ describe('useSWRxRef and useSWRxRefs integration tests', () => {
 
       axiosGetSpy.mockRestore();
     });
-
-    it('should handle different refs options correctly', async () => {
-      const axiosGetSpy = setupAxiosSpy();
-
-      const { result } = renderHook(() =>
-        useSWRxRefs(
-          '/parent-page',
-          undefined,
-          { regexp: 'test.*\\.jpg', depth: '3' },
-          false,
-        ),
-      );
-
-      await waitFor(() => expect(result.current.data).toBeDefined(), {
-        timeout: 5000,
-      });
-
-      expect(axiosGetSpy).toHaveBeenCalledWith(
-        '/_api/attachment-refs/refs',
-        expect.objectContaining({
-          params: expect.objectContaining({
-            pagePath: '/parent-page',
-            prefix: undefined,
-            options: expect.objectContaining({
-              regexp: 'test.*\\.jpg',
-              depth: '3',
-            }),
-          }),
-        }),
-      );
-
-      expect(result.current.data).toBeDefined();
-      expect(result.current.error).toBeUndefined();
-
-      axiosGetSpy.mockRestore();
-    });
   });
 });

+ 0 - 35
packages/remark-lsx/src/client/stores/lsx/lsx.spec.ts

@@ -134,41 +134,6 @@ describe('useSWRxLsx integration tests', () => {
     axiosGetSpy.mockRestore();
   });
 
-  it('should handle different lsx options correctly', async () => {
-    const axiosGetSpy = setupAxiosSpy();
-
-    const { result } = renderHook(() =>
-      useSWRxLsx(
-        '/parent-page',
-        { depth: '2', filter: 'test', sort: 'createdAt' },
-        false,
-      ),
-    );
-
-    await waitFor(() => expect(result.current.data).toBeDefined(), {
-      timeout: 5000,
-    });
-
-    expect(axiosGetSpy).toHaveBeenCalledWith(
-      '/_api/lsx',
-      expect.objectContaining({
-        params: expect.objectContaining({
-          pagePath: '/parent-page',
-          options: expect.objectContaining({
-            depth: '2',
-            filter: 'test',
-            sort: 'createdAt',
-          }),
-        }),
-      }),
-    );
-
-    expect(result.current.data).toBeDefined();
-    expect(result.current.error).toBeUndefined();
-
-    axiosGetSpy.mockRestore();
-  });
-
   it('should handle server validation errors properly', async () => {
     const axiosGetSpy = setupAxiosSpy();