@s-libs/ng-vitest
    Preparing search index...

    Class MockController<F>

    Provides expectations and matching around a vitest mock that will be familiar to users of Angular's HttpTestingController.

    Type Parameters

    • F extends Func

    Hierarchy

    Index

    Constructors

    Methods

    • Expect that no requests were made that match the given condition.

      If a matching call was made, fail with an error message including the given request description, if any.

      Parameters

      • matcher: CallMatcher<TestCall<F>>
      • Optionaldescription: string

      Returns void

    • Expect that a single call was made that matches the given condition, and return its TestCall.

      If no such call was made, or more than one such call was made, fail with an error message including the given request description, if any.

      Parameters

      • matcher: CallMatcher<TestCall<F>>
      • Optionaldescription: string

      Returns TestCall

    • Verify that no unmatched calls are outstanding.

      If any calls are outstanding, fail with an error message indicating which calls were not handled.

      Returns void