Member Junction
    Preparing search index...

    Exact Match Oracle.

    Performs deterministic comparison between expected and actual output. Supports various comparison modes (exact, contains, regex, deep equality).

    Configuration:

    • mode: Comparison mode ('exact' | 'contains' | 'regex' | 'deep' | 'partial')
    • caseSensitive: Whether string comparisons are case-sensitive (default: true)
    • ignoreWhitespace: Whether to normalize whitespace before comparison (default: false)
    • fields: For 'partial' mode, which fields to compare (array of paths)
    const oracle = new ExactMatchOracle();

    // Exact match
    const result1 = await oracle.evaluate({
    expectedOutput: { status: 'success', count: 5 },
    actualOutput: { status: 'success', count: 5 }
    }, { mode: 'exact' });

    // Contains mode (actual must contain all expected fields)
    const result2 = await oracle.evaluate({
    expectedOutput: { status: 'success' },
    actualOutput: { status: 'success', count: 5, extra: 'data' }
    }, { mode: 'contains' });

    // Regex match
    const result3 = await oracle.evaluate({
    expectedOutput: { pattern: 'sales.*region' },
    actualOutput: { response: 'Sales by region report' }
    }, { mode: 'regex' });

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    type: "exact-match" = 'exact-match'

    Unique type identifier for this oracle. Used in test configuration to specify which oracles to run.

    Methods