UNPKG

react-unit-test-generator

Version:

react-unit-test-generator is a helper for writing unit tests for React apps. Its main goal is to automatically generate a suite of the most common test cases for a given component.

5 lines (4 loc) 173 B
export default function getMethodMockName(method) { const methodCapitalized = method.charAt(0).toUpperCase() + method.slice(1); return `mock${methodCapitalized}`; }