All files / Rindu/utils isCorruptedTrack.ts

100% Statements 3/3
100% Branches 3/3
100% Functions 1/1
100% Lines 3/3

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    5x   3x 3x    
import { ITrack } from "types/spotify";
 
export function isCorruptedTrack(track: ITrack | null): boolean {
  const isCorrupted =
    !track?.name && !track?.artists?.[0]?.name && track?.duration_ms === 0;
  return isCorrupted;
}