arvo-event-handler
    Preparing search index...

    Type Alias ArvoTestCase

    Defines a complete test case containing one or more sequential steps.

    Test cases execute steps in order, passing output events from each step to the next. This allows testing of complex event chains and workflows. Optional repeat configuration helps handle flaky tests by running them multiple times and checking success rate.

    const testCase: ArvoTestCase = {
    name: 'User registration flow',
    steps: [
    { input: () => createUserEvent(), expectedEvents: (e) => e.length === 2 },
    { input: (prev) => prev[0], expectedEvents: (e) => e[0].type === 'email.sent' }
    ],
    repeat: { times: 10, successThreshold: 95 }
    };
    type ArvoTestCase = {
        name: string;
        repeat?: { successThreshold: number; times: number };
        steps: [ArvoTestStep, ...ArvoTestStep[]];
    }
    Index

    Properties

    Properties

    name: string

    Descriptive name for the test case, displayed in test output.

    repeat?: { successThreshold: number; times: number }

    Optional configuration for running the test multiple times. Useful for testing non-deterministic handlers or catching intermittent failures. The test passes only if the success rate meets or exceeds the threshold.

    Type Declaration

    • successThreshold: number

      Minimum percentage of successful runs required for the test to pass (0-100). For example, 95 means at least 95% of runs must succeed.

    • times: number

      Number of times to execute the entire test case

    steps: [ArvoTestStep, ...ArvoTestStep[]]

    Sequential steps to execute in order. Must contain at least one step.