import type { Helper } from "../helper-registry.js"; /** * Return the magnitude (absolute value) of a number. * Useful for normalizing test durations, error counts, or differences in CTRF reports. * * @example * {{abs test.duration}} * * * * @param {unknown} a - The value to get the absolute value of. * @returns {number} The absolute value. * Use to display positive-only metrics in test summaries. */ export declare const absHelper: Helper; /** * Return the sum of a plus b. * Useful for aggregating test metrics, such as total retries or combined durations. * * @example * {{add test.duration 100}} * * * * @param {unknown} a - First number. * @param {unknown} b - Second number. * @returns {number} The sum. * Use to add fixed offsets to test metrics. */ export declare const addHelper: Helper; /** * Adds multiple numbers together and returns the sum. * Useful for totaling multiple test metrics or values in a single expression. * * @example * {{addAll test.duration test.retries 100}} * * * * {{addAll 1 2 3 4 5}} * * * @param {...unknown} args - The numbers to be added (last argument is Handlebars options). * @returns {number} The sum of all provided numbers. * Use to combine multiple test metrics into a total. */ export declare const addAllHelper: Helper; /** * Returns the average of all numbers in the given array. * Useful for calculating average test durations, retry counts, or error rates in CTRF reports. * * @example * {{avg "[1, 2, 3, 4, 5]"}} * * * @param {unknown} arr - Array of numbers (array or JSON string). * @returns {number} The average value. * Use to show average test duration in a summary table. */ export declare const avgHelper: Helper; /** * Get the Math.ceil() of the given value. * Useful for rounding up test metrics, such as duration or retry counts. * * @example * {{ceil test.duration}} * * * * @param {unknown} value - The value to ceil. * @returns {number} The ceiled value. * Use to ensure minimum thresholds in test reporting. */ export declare const ceilHelper: Helper; /** * Divide a by b. * Useful for calculating rates, averages, or percentages in CTRF reports. * * @example * {{divide test.duration test.retries}} * * * * @param {unknown} a - Numerator. * @param {unknown} b - Denominator. * @returns {number} The result of division, or 0 if denominator is 0. * Use to compute average duration per retry. */ export declare const divideHelper: Helper; /** * Get the Math.floor() of the given value. * Useful for rounding down test metrics, such as duration or retry counts. * * @example * {{floor test.duration}} * * * * @param {unknown} value - The value to floor. * @returns {number} The floored value. * Use to truncate values for display. */ export declare const floorHelper: Helper; /** * Return the difference of a minus b. * Useful for calculating deltas between test metrics, such as duration differences. * * @example * {{minus test.duration 10}} * * * * @param {unknown} a - First number. * @param {unknown} b - Second number. * @returns {number} The difference. * Use to show improvement or regression in test times. */ export declare const minusHelper: Helper; /** * Get the remainder of a division operation (a % b). * Useful for calculating modulo in test metrics, such as grouping or bucketing. * * @example * {{modulo test.index 3}} * * * * @param {unknown} a - Numerator. * @param {unknown} b - Denominator. * @returns {number} The remainder. * Use to alternate row colors in test tables. */ export declare const moduloHelper: Helper; /** * Return the product of a times b. * Useful for scaling test metrics, such as multiplying durations or retry counts. * * @example * {{multiply test.duration 2}} * * * * @param {unknown} a - First factor. * @param {unknown} b - Second factor. * @returns {number} The product. * Use to double or scale test metrics. */ export declare const multiplyHelper: Helper; /** * Add a by b (alias for add). * Useful for summing test metrics. * * @example * {{plus test.duration 5}} * * * * @param {unknown} a - First number. * @param {unknown} b - Second number. * @returns {number} The sum. * Use to increment test metrics. */ export declare const plusHelper: Helper; /** * Generate a random number between two values (inclusive, integer). * Useful for generating random test data or sampling in CTRF reports. * * @example * {{random 1 10}} * * * @param {unknown} min - Minimum value. * @param {unknown} max - Maximum value. * @returns {number} Random integer between min and max. * Use to create randomized test IDs or sample data. */ export declare const randomHelper: Helper; /** * Get the remainder when a is divided by b (alias for modulo). * Useful for grouping or bucketing test metrics. * * @example * {{remainder test.index 4}} * * * * @param {unknown} a - Numerator. * @param {unknown} b - Denominator. * @returns {number} The remainder. * Use to alternate row colors in test tables. */ export declare const remainderHelper: Helper; /** * Round the given number to the nearest integer. * Useful for rounding test metrics for display in CTRF reports. * * @example * {{round test.duration}} * * * * @param {unknown} number - The number to round. * @returns {number} The rounded value. * Use to display rounded metrics in summary tables. */ export declare const roundHelper: Helper; /** * Return the difference of a minus b (alias for minus). * Useful for calculating deltas between test metrics. * * @example * {{subtract test.duration 5}} * * * * @param {unknown} a - First number. * @param {unknown} b - Second number. * @returns {number} The difference. * Use to show improvement or regression in test times. */ export declare const subtractHelper: Helper; /** * Returns the sum of all numbers in the given array. * Useful for calculating total durations, retries, or error counts in CTRF reports. * * @example * {{sum "[1, 2, 3, 4, 5]"}} * * * @param {unknown} arr - Array of numbers (array or JSON string). * @returns {number} The sum. * Use to show total test duration in a summary table. */ export declare const sumHelper: Helper; /** * Multiply number a by number b (alias for multiply). * Useful for scaling test metrics. * * @example * {{times test.duration 3}} * * * * @param {unknown} a - First factor. * @param {unknown} b - Second factor. * @returns {number} The product. * Use to scale test metrics for reporting. */ export declare const timesHelper: Helper; export declare const mathHelpers: Helper[];