A package for adding no operation (noop) hooks to incomplete hook objects
npm install --save [email protected]
or
yarn add [email protected]
import type { Stats } from '@fault/types';
export const ochiai = (
codeElementTestStateCounts: Stats,
totalTestStateCounts: Stats,
) => {
if (totalTestStateCounts.failed === 0) {
return null;
}
if (
codeElementTestStateCounts.failed === 0 &&
codeElementTestStateCounts.passed === 0
) {
return null;
}
return (
codeElementTestStateCounts.failed /
Math.sqrt(
totalTestStateCounts.failed *
(codeElementTestStateCounts.failed + codeElementTestStateCounts.passed),
)
);
};
export default ochiai;
This documentation was generated using writeme