import type { Helper } from "../helper-registry.js"; /** * Convert the given string to a regular expression. * * @example * {{toRegex "foo"}} * * * {{#if (test test.name (toRegex "^Login"))}} * * {{/if}} * * Use with CTRF templates to dynamically filter or highlight test names, error messages, or log lines that match a pattern. * * @param {unknown} str - The string pattern to convert to a RegExp (from test data or template input). * @returns {RegExp|null} The RegExp object for use in test reporting, or null if input is invalid. */ export declare const toRegexHelper: Helper; /** * Returns true if the given `str` matches the given regex. A regex can * be passed on the context, or using the [toRegex](#toregex) helper as a subexpression. * * @example * {{test "bar" (toRegex "foo")}} * * {{test "foobar" (toRegex "foo")}} * * {{test "foobar" (toRegex "^foo$")}} * * * {{#if (test test.error (toRegex "timeout"))}} * * {{/if}} * * Use with CTRF templates to conditionally render sections, highlight failures, or group tests by matching patterns in names, errors, or logs. * * @param {unknown} str - The string to test (from test data). * @param {unknown} regex - The RegExp to test against (from toRegex or context). * @returns {boolean} True if the string matches the regex, false otherwise. */ export declare const testHelper: Helper; /** * Suggestion: Use {{test someString (toRegex "pattern")}} in your CTRF Handlebars templates to filter or highlight test results based on dynamic patterns. */ export declare const regexHelpers: Helper[];