From 605105da09058943a55e5c26ebbe690841996a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=88=AA=E5=AE=87?= <3364451258@qq.com> Date: Tue, 26 May 2026 22:48:03 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E7=A7=BB=E9=99=A4=20=5FmarkDirty=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=88=E5=87=BD=E6=95=B0=E5=B7=B2=E7=A7=81?= =?UTF-8?q?=E6=9C=89=E5=8C=96=EF=BC=8C=E8=A1=8C=E4=B8=BA=E7=94=B1=20CRUD?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E9=97=B4=E6=8E=A5=E8=A6=86=E7=9B=96?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- tests/unit/app-store.test.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/unit/app-store.test.ts b/tests/unit/app-store.test.ts index c2243f2..7ccf04a 100644 --- a/tests/unit/app-store.test.ts +++ b/tests/unit/app-store.test.ts @@ -197,28 +197,6 @@ describe('undo/redo', () => { }); }); -describe('_markDirty', () => { - beforeEach(() => { - vi.clearAllMocks(); - resetStore(); - }); - - it('修改后 isModified 为 true', () => { - useAppStore.setState({ _savedSys: [], sysPaths: [], _savedUser: [], userPaths: [] }); - useAppStore.getState()._markDirty(); - expect(useAppStore.getState().isModified).toBe(false); // 相等 - }); - - it('路径变化时 isModified 为 true', () => { - useAppStore.setState({ - _savedSys: ['A'], sysPaths: ['B'], - _savedUser: [], userPaths: [], - }); - useAppStore.getState()._markDirty(); - expect(useAppStore.getState().isModified).toBe(true); - }); -}); - describe('loadPaths', () => { beforeEach(() => { vi.clearAllMocks();