ScriptedRequest<TId, TValue, TKey>.alwaysFailing constructor

ScriptedRequest<TId, TValue, TKey>.alwaysFailing(
  1. Object error
)

Creates a request that always throws error.

Implementation

factory ScriptedRequest.alwaysFailing(Object error) =>
    ScriptedRequest<TId, TValue, TKey>([
      // A test must be able to script a non-Error throw, because a real
      // request callback can produce one.
      // ignore: only_throw_errors
      (ids, key) => throw error,
    ]);