arvo-event-handler
    Preparing search index...

    Interface IArvoTestFramework

    Adapter interface for integrating with different test frameworks.

    Provides a unified interface for test framework primitives (describe, test, beforeEach), enabling the same test suites to run on Vitest, Jest, Mocha, or any other framework. Implementations should wrap their framework's native functions.

    // Vitest adapter
    import { describe, test, beforeEach } from 'vitest';

    const vitestAdapter: IArvoTestFramework = {
    describe,
    test,
    beforeEach
    };

    // Mocha adapter
    const mochaAdapter: IArvoTestFramework = {
    describe,
    test: it,
    beforeEach
    };
    interface IArvoTestFramework {
        beforeEach(fn: () => void): void;
        describe(name: string, fn: () => void): void;
        test(name: string, fn: () => Promise<void>): void;
    }
    Index

    Methods

    • Runs setup logic before each test in the current describe block.

      Parameters

      • fn: () => void

      Returns void

    • Groups related tests into a test suite.

      Parameters

      • name: string
      • fn: () => void

      Returns void

    • Defines a single test case.

      Parameters

      • name: string
      • fn: () => Promise<void>

      Returns void