All files / Scripts/table SummaryTable.ts

100% Statements 5/5
100% Branches 0/0
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 8 9 10 11 12 13 145x     5x     92x       5x      
import { TableSection } from "./TableSection";
import { Row } from "../row/Row";
 
export abstract class SummaryTable extends TableSection {
    public abstract get rows(): Row[];
    public abstract readonly tag: string;
    public readonly paneClass = "sectionHeader" as const;
 
    // Default exists implementation for summary tables
    public exists(): boolean {
        return this.rows.some(row => !!row.value);
    }
}