import type { Helper } from "../helper-registry.js"; /** * Extend the context with the properties of other objects. * A shallow merge is performed to avoid mutating the context. * Useful for combining test metadata, configuration objects, and report data in CTRF templates. * * @example * {{extend test.metadata test.config}} * * * {{extend test.results test.summary}} * * * @param {unknown} context - The base context object from test data. * @param {...unknown} objects - One or more objects to extend with. * @returns {Record} The extended object for use in test reports. */ export declare const extendHelper: Helper; /** * Block helper that iterates over the properties of an object, exposing each key and value on the context. * Useful for rendering test metadata, configuration settings, or nested test data in CTRF reports. * * @example * {{#forIn test.metadata}} * {{@key}}: {{this}} * {{/forIn}} * * * {{#forIn test.config}} * {{@key}}{{this}} * {{/forIn}} * * * @param {unknown} context - The object to iterate over from test data. * @param {unknown} options - Handlebars options object. * @returns {string} Rendered block for each property with key and value exposed. */ export declare const forInHelper: Helper; /** * Block helper that iterates over the **own** properties of an object, exposing each key and value on the context. * Useful for rendering test-specific data without inherited properties in CTRF reports. * * @example * {{#forOwn test.results}} * {{@key}}: {{this}} * {{/forOwn}} * * * {{#forOwn test.metadata}} *
  • {{@key}}: {{this}}
  • * {{/forOwn}} * * * @param {unknown} obj - The object to iterate over from test data. * @param {unknown} options - Handlebars options object. * @returns {string} Rendered block for each own property with key and value exposed. */ export declare const forOwnHelper: Helper; /** * Take arguments and, if they are string or number, convert them to a dot-delineated object property path. * Useful for creating dynamic property paths for accessing nested test data in CTRF reports. * * @example * {{toPath "test" "results" "status"}} * * * {{toPath "suite" 0 "name"}} * * * @param {...unknown} props - The property segments to assemble (can be multiple). * @returns {string} The dot-delineated property path for use in test reports. */ export declare const toPathHelper: Helper; /** * Use property paths (`a.b.c`) to get a value or nested value from the context. * Works as a regular helper or block helper. * Useful for accessing deeply nested test data, configuration values, or metadata in CTRF reports. * * @example * {{get "test.results.status" test}} * * * {{get "suite.tests.0.name" data}} * * * {{#get "test.metadata" test}} * {{this}} * {{/get}} * * * @param {unknown} prop - The property to get, optionally using dot notation for nested properties. * @param {unknown} context - The context object from test data. * @param {unknown} options - The handlebars options object, if used as a block helper. * @returns {unknown} The retrieved value for use in test reports. */ export declare const getHelper: Helper; /** * Use property paths (`a.b.c`) to get an object from the context. * Differs from the `get` helper in that this helper will return the actual object, including the given property key. * Also, this helper does not work as a block helper. * Useful for accessing parent objects or containers in CTRF reports. * * @example * {{getObject "test.results" test}} * * * {{getObject "suite.tests" data}} * * * @param {unknown} prop - The property to get, optionally using dot notation for nested properties. * @param {unknown} context - The context object from test data. * @returns {unknown} The retrieved object for use in test reports. */ export declare const getObjectHelper: Helper; /** * Return true if `key` is an own, enumerable property of the given `context` object. * Useful for conditional logic and validation in CTRF report templates. * * @example * {{hasOwn test "status"}} * * * {{#if (hasOwn test.metadata "priority")}} * Priority: {{test.metadata.priority}} * {{/if}} * * * @param {unknown} context - The context object from test data. * @param {unknown} key - The property key to check. * @returns {boolean} True if the key is an own, enumerable property for use in test reports. */ export declare const hasOwnHelper: Helper; /** * Return true if `value` is an object. * Useful for conditional logic and type checking in CTRF report templates. * * @example * {{isObject test.results}} * * * {{isObject "string"}} * * * {{#if (isObject test.metadata)}} * {{#forIn test.metadata}} * {{@key}}: {{this}} * {{/forIn}} * {{/if}} * * * @param {unknown} value - The value from test data to check. * @returns {boolean} True if the value is an object for use in test reports. */ export declare const isObjectHelper: Helper; /** * Parses the given string using `JSON.parse`. * Useful for parsing JSON strings from test data, configuration, or API responses in CTRF reports. * * @example * {{JSONparse test.jsonData}} * * * * {{#JSONparse test.configString}} * {{status}} - {{duration}}ms * {{/JSONparse}} * * * @param {unknown} string - The string to parse from test data. * @param {unknown} options - Handlebars options object for block usage. * @returns {unknown} The parsed object for use in test reports. */ export declare const JSONparseHelper: Helper; /** * Stringify an object using `JSON.stringify`. * Useful for serializing test data, configuration objects, or complex data structures in CTRF reports. * * @example * {{JSONstringify test.results}} * * * * {{JSONstringify test.metadata}} * * * @param {unknown} obj - Object to stringify from test data. * @returns {string} The JSON string for use in test reports. */ export declare const JSONstringifyHelper: Helper; /** * Deeply merge the properties of the given `objects` with the context object. * Useful for combining test data, configuration, and metadata with deep merging in CTRF reports. * * @example * {{merge test.results test.metadata}} * * * {{merge {} test.config test.overrides}} * * * @param {unknown} object - The target object. Pass an empty object to shallow clone. * @param {...unknown} objects - Additional objects to merge. * @returns {Record} The merged object for use in test reports. */ export declare const mergeHelper: Helper; /** * Pick properties from the context object. * Useful for selecting specific test data fields, creating filtered views, or extracting relevant information in CTRF reports. * * @example * {{pick test "name" "status" "duration"}} * * * {{#pick test.metadata "priority" "category"}} * {{priority}} - {{category}} * {{/pick}} * * * {{#pick test.results "passed" "failed"}} * Passed: {{passed}}, Failed: {{failed}} * {{else}} * No results available * {{/pick}} * * * @param {unknown} properties - One or more properties to pick. * @param {unknown} context - The context object from test data. * @param {unknown} options - Handlebars options object. * @returns {unknown} Returns an object with the picked values. If used as a block helper, the values are passed as context to the inner block. If no values are found, the context is passed to the inverse block. */ export declare const pickHelper: Helper; export declare const objectHelpers: Helper[];