Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 885 Bytes

File metadata and controls

45 lines (38 loc) · 885 Bytes

Hook Schema

A package for adding no operation (noop) hooks to incomplete hook objects

Installation

npm install --save [email protected]

or

Examples

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