refactor: jsc-mod 改名 jsc-mod-statusline、jsc-companion 改名 jsc-mod-companion,指令拆成獨立指令
- jsc-mod-statusline:/jsc-mod-statusline:enable、compact、disable - jsc-mod-companion:/jsc-mod-companion:status、switch、disable、setup、todo、quiet - 同步更新 plugin.json、marketplace.json 與各 README - 補上 statusline band 測試缺少的 ui.render 底層處理 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
0e7636c185
commit
ea17f1cb2d
@@ -0,0 +1,13 @@
|
||||
import { expect } from 'claude-code/testing'
|
||||
|
||||
// 讓只能 import 'claude-code/testing' 的測試沙箱,沿用 node:assert/strict 的寫法
|
||||
const assert = Object.assign((v: unknown, msg?: string) => expect(v, msg).toBeTruthy(), {
|
||||
ok: (v: unknown, msg?: string) => expect(v, msg).toBeTruthy(),
|
||||
equal: (a: unknown, b: unknown, msg?: string) => expect(a, msg).toBe(b),
|
||||
notEqual: (a: unknown, b: unknown, msg?: string) => expect(a, msg).not.toBe(b),
|
||||
deepEqual: (a: unknown, b: unknown, msg?: string) => expect(a, msg).toEqual(b),
|
||||
match: (s: string, re: RegExp, msg?: string) => expect(re.test(s), msg).toBe(true),
|
||||
doesNotMatch: (s: string, re: RegExp, msg?: string) => expect(re.test(s), msg).toBe(false),
|
||||
throws: (fn: () => unknown, msg?: string) => expect(fn, msg).toThrow(),
|
||||
})
|
||||
export default assert
|
||||
Reference in New Issue
Block a user