MCPcopy Create free account
hub / github.com/Noumena-Network/code / createMockContext

Function createMockContext

src/commands/commit.test.ts:84–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83// biome-ignore-all assist/source/organizeImports: bun:test must be top level
84function createMockContext() {
85 return {
86 abortController: new AbortController(),
87 // biome-ignore-next-line @typescript-eslint/no-empty-function
88 readFileState: { get: () => undefined },
89 getAppState: () => ({
90 toolPermissionContext: {
91 mode: 'default',
92 alwaysAllowRules: {},
93 sessionApprovedTools: new Set(),
94 explicitDenials: [],
95 // biome-ignore-next-line @typescript-eslint/no-empty-function
96 trackDenial: () => {},
97 sessionApprovedCommands: new Set(),
98 commandFingerprintToToolName: new Map(),
99 },
100 }),
101 // biome-ignore-next-line @typescript-eslint/no-empty-function
102 setAppState: () => {},
103 } as never
104}
105
106describe('/commit command', () => {
107 beforeEach(() => {

Callers 1

commit.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected