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

Function calculator

test/browser/fixtures/mocking/src/mocks_calculator.ts:3–8  ·  view source on GitHub ↗
(operation: 'plus', a: number, b: number)

Source from the content-addressed store, hash-verified

1import { plus } from './actions'
2
3export function calculator(operation: 'plus', a: number, b: number) {
4 if (operation === 'plus')
5 return plus(a, b)
6
7 throw new Error('unknown operation')
8}

Callers 1

Calls 1

plusFunction · 0.90

Tested by

no test coverage detected