mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 15:55:50 +00:00
feat: 注册所有新命令到命令系统和工具注册表
- commands.ts: 注册所有新命令(memory-stores、vault、schedule 等), 移除 require() 动态加载,统一为 ESM import - tools.ts: 注册 LocalMemoryRecallTool、VaultHttpFetchTool - 补充命令测试(bridge-kick、commit、commit-push-pr、init-verifiers) - 补充工具测试(AgentTool、RemoteTrigger、SkillTool、WebFetch、WebSearch) - 集成测试:autonomy-lifecycle-user-flow 更新 - 探测脚本和功能文档 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import { describe, expect, mock, test } from 'bun:test'
|
||||
import { afterAll, describe, expect, mock, test } from 'bun:test'
|
||||
import { setupAxiosMock } from '../../../../../../tests/mocks/axios'
|
||||
|
||||
// Each test below calls `mock.module('axios', ...)` per-test. Re-register a
|
||||
// spread-real axios mock at end-of-file so the per-test stubs do not leak
|
||||
// into subsequent test files (mock.module is process-global, last-write-wins).
|
||||
afterAll(() => {
|
||||
setupAxiosMock()
|
||||
})
|
||||
|
||||
const _abortMock = () => ({
|
||||
AbortError: class AbortError extends Error {
|
||||
|
||||
@@ -1,4 +1,22 @@
|
||||
import { afterEach, beforeEach, describe, expect, mock, test } from 'bun:test'
|
||||
import {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
mock,
|
||||
test,
|
||||
} from 'bun:test'
|
||||
import { setupAxiosMock } from '../../../../../../tests/mocks/axios'
|
||||
|
||||
// Each test below calls `mock.module('axios', ...)` per-test. Without an
|
||||
// afterAll cleanup, the LAST per-test stub leaks into every test file that
|
||||
// runs after this one (mock.module is process-global, last-write-wins). The
|
||||
// spread-real mock registered here at the end re-routes axios to the real
|
||||
// module, undoing the stub leakage so later suites see real axios.
|
||||
afterAll(() => {
|
||||
setupAxiosMock()
|
||||
})
|
||||
|
||||
// Defensive mock: agent.test.ts mocks config.js which can corrupt Bun's
|
||||
// src/* path alias resolution. Provide AbortError directly so the dynamic
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
import { afterEach, describe, expect, mock, test } from 'bun:test'
|
||||
import { afterAll, afterEach, describe, expect, mock, test } from 'bun:test'
|
||||
import { setupAxiosMock } from '../../../../../../tests/mocks/axios'
|
||||
|
||||
// Each test below calls `mock.module('axios', ...)` per-test. Re-register a
|
||||
// spread-real axios mock at end-of-file so the per-test stubs do not leak
|
||||
// into subsequent test files (mock.module is process-global, last-write-wins).
|
||||
afterAll(() => {
|
||||
setupAxiosMock()
|
||||
})
|
||||
|
||||
const _abortMock = () => ({
|
||||
AbortError: class AbortError extends Error {
|
||||
|
||||
Reference in New Issue
Block a user