All files / lib/utils getDefaultModelName.ts

62.5% Statements 5/8
0% Branches 0/3
50% Functions 1/2
50% Lines 3/6

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 8 9 10 11    1x 46x     1x        
import { HookContext } from "@feathersjs/feathers";
 
export const getContextPath = (context: HookContext): string => {
  return context.path;
};
 
export const getModelName = (context: HookContext): string => {
  const { service } = context;
  const modelName = service.modelName || service.Model && service.Model.name;
  return modelName;
};