MCPcopy
hub / github.com/npmx-dev/npmx.dev / mockCreateError

Function mockCreateError

test/unit/server/utils/file-tree.spec.ts:25–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25const mockCreateError = () => {
26 const createErrorMock = vi.fn((opts: { statusCode: number; message: string }) => opts)
27 vi.stubGlobal('createError', createErrorMock)
28 return createErrorMock
29}
30
31describe('convertToFileTree', () => {
32 it('converts jsDelivr nodes to a sorted tree with directories first', () => {

Callers 1

file-tree.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected