All files / src/utils is-valid-method.ts

83.33% Statements 5/6
0% Branches 0/1
100% Functions 2/2
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 81x     1x 2x 3x    
import { OpenAPIV3 } from 'openapi-types'
 
 
export function isValidMethod(method: unknown): method is OpenAPIV3.HttpMethods {
  Iif (typeof method !== 'string') return false
  return Object.values(OpenAPIV3.HttpMethods).some((m) => m === method)
}