MCPcopy
hub / github.com/vitest-dev/vitest / automock

Function automock

test/core/test/browserAutomocker.test.ts:5–7  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

3import { expect, it } from 'vitest'
4
5function automock(code: string) {
6 return automockModule(code, 'automock', parseAst).toString()
7}
8
9it('correctly parses function declaration', () => {
10 expect(automock(`

Callers 1

Calls 2

automockModuleFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected