Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

fix(pet): 修正宠物菜单测试的两处 lint 错误

hairyfae9aa4b1dad6
diff --git a/packages/dsh-tauri-pet/src/client/register/settings-menu.utils.test.ts b/packages/dsh-tauri-pet/src/client/register/settings-menu.utils.test.ts
index cd50e49e..bee45eb7 100644
--- a/packages/dsh-tauri-pet/src/client/register/settings-menu.utils.test.ts
+++ b/packages/dsh-tauri-pet/src/client/register/settings-menu.utils.test.ts
@@ -44,7 +44,7 @@ interface FakeShortcut {
function fakeItem(text: string, structure = true, buttonText = text): HTMLButtonElement {
const label: FakeLabel | null = structure ? { textContent: text } : null
const icon: FakeIcon | null = structure ? { innerHTML: '<svg data-official="1"></svg>' } : null
- const shortcut: FakeShortcut | null = structure ? { removed: false, remove: () => { node.shortcut!.removed = true } } : null
+ const shortcut: FakeShortcut | null = structure ? { removed: false, remove: () => {} } : null
const node = {
textContent: buttonText,
label,
@@ -67,6 +67,11 @@ function fakeItem(text: string, structure = true, buttonText = text): HTMLButton
node.attributes[name] = value
},
}
+ if (shortcut !== null) {
+ shortcut.remove = () => {
+ shortcut.removed = true
+ }
+ }
return node as unknown as HTMLButtonElement
}