A package for adding no operation (noop) hooks to incomplete hook objects
npm install --save hook-schema@2.2.4-0
or
yarn add hook-schema@2.2.4-0
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