mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
refactor: 代码清理 — 删除 AppError、重命名 replacePaths、修正 detectExportFormat、统一 PATH 长度、优化 BOM 检查、添加同步注释
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -140,11 +140,11 @@ describe('app-store CRUD', () => {
|
||||
expect(useAppStore.getState().sysPaths).toEqual(['C:\\valid']);
|
||||
});
|
||||
|
||||
it('importPaths 整体替换列表', () => {
|
||||
it('replacePaths 整体替换列表', () => {
|
||||
const store = useAppStore.getState();
|
||||
store.addPath('old1', TargetType.USER);
|
||||
store.addPath('old2', TargetType.USER);
|
||||
store.importPaths(TargetType.USER, ['new1', 'new2', 'new3']);
|
||||
store.replacePaths(TargetType.USER, ['new1', 'new2', 'new3']);
|
||||
expect(useAppStore.getState().userPaths).toEqual(['new1', 'new2', 'new3']);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user