langchain.js
    Preparing search index...

    Function generateWrapperFromJestlikeMethods

    • Parameters

      • methods: Record<string, any>
      • testRunnerName: string

      Returns {
          describe: LangSmithJestlikeDescribeWrapper & {
              concurrent: LangSmithJestlikeDescribeWrapper;
              only: LangSmithJestlikeDescribeWrapper;
              skip: LangSmithJestlikeDescribeWrapper;
          };
          expect: Expect;
          it: <
              I extends Record<string, any> = Record<string, any>,
              O extends Record<string, any> = Record<string, any>,
          >(
              name: string,
              lsParams: LangSmithJestlikeWrapperParams<I, O>,
              testFn: LangSmithJestlikeTestFunction<I, O>,
              timeout?: number,
          ) => void & {
              concurrent: <
                  I extends Record<string, any> = Record<string, any>,
                  O extends Record<string, any> = Record<string, any>,
              >(
                  name: string,
                  lsParams: LangSmithJestlikeWrapperParams<I, O>,
                  testFn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void & {
                  each: <I extends KVMap, O extends KVMap>(
                      table: (
                          { id?: string; inputs: I; referenceOutputs?: O } & Record<
                              string,
                              any,
                          >
                      )[],
                      config?: LangSmithJestlikeWrapperConfig,
                  ) => (
                      name: string,
                      fn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void;
                  only: <
                      I extends Record<string, any> = Record<string, any>,
                      O extends Record<string, any> = Record<string, any>,
                  >(
                      name: string,
                      lsParams: LangSmithJestlikeWrapperParams<I, O>,
                      testFn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void & {
                      each: <I extends KVMap, O extends KVMap>(
                          table: (
                              { id?: ...; inputs: ...; referenceOutputs?: ... } & Record<
                                  (...),
                                  (...),
                              >
                          )[],
                          config?: LangSmithJestlikeWrapperConfig,
                      ) => (
                          name: string,
                          fn: LangSmithJestlikeTestFunction<I, O>,
                          timeout?: number,
                      ) => void;
                  };
                  skip: <
                      I extends Record<string, any> = Record<string, any>,
                      O extends Record<string, any> = Record<string, any>,
                  >(
                      name: string,
                      lsParams: LangSmithJestlikeWrapperParams<I, O>,
                      testFn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void & {
                      each: <I extends KVMap, O extends KVMap>(
                          table: (
                              { id?: ...; inputs: ...; referenceOutputs?: ... } & Record<
                                  (...),
                                  (...),
                              >
                          )[],
                          config?: LangSmithJestlikeWrapperConfig,
                      ) => (
                          name: string,
                          fn: LangSmithJestlikeTestFunction<I, O>,
                          timeout?: number,
                      ) => void;
                  };
              };
              each: <I extends KVMap, O extends KVMap>(
                  table: (
                      { id?: string; inputs: I; referenceOutputs?: O } & Record<
                          string,
                          any,
                      >
                  )[],
                  config?: LangSmithJestlikeWrapperConfig,
              ) => (
                  name: string,
                  fn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void;
              only: <
                  I extends Record<string, any> = Record<string, any>,
                  O extends Record<string, any> = Record<string, any>,
              >(
                  name: string,
                  lsParams: LangSmithJestlikeWrapperParams<I, O>,
                  testFn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void & {
                  each: <I extends KVMap, O extends KVMap>(
                      table: (
                          { id?: string; inputs: I; referenceOutputs?: O } & Record<
                              string,
                              any,
                          >
                      )[],
                      config?: LangSmithJestlikeWrapperConfig,
                  ) => (
                      name: string,
                      fn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void;
              };
              skip: <
                  I extends Record<string, any> = Record<string, any>,
                  O extends Record<string, any> = Record<string, any>,
              >(
                  name: string,
                  lsParams: LangSmithJestlikeWrapperParams<I, O>,
                  testFn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void & {
                  each: <I extends KVMap, O extends KVMap>(
                      table: (
                          { id?: string; inputs: I; referenceOutputs?: O } & Record<
                              string,
                              any,
                          >
                      )[],
                      config?: LangSmithJestlikeWrapperConfig,
                  ) => (
                      name: string,
                      fn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void;
              };
          };
          test: <
              I extends Record<string, any> = Record<string, any>,
              O extends Record<string, any> = Record<string, any>,
          >(
              name: string,
              lsParams: LangSmithJestlikeWrapperParams<I, O>,
              testFn: LangSmithJestlikeTestFunction<I, O>,
              timeout?: number,
          ) => void & {
              concurrent: <
                  I extends Record<string, any> = Record<string, any>,
                  O extends Record<string, any> = Record<string, any>,
              >(
                  name: string,
                  lsParams: LangSmithJestlikeWrapperParams<I, O>,
                  testFn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void & {
                  each: <I extends KVMap, O extends KVMap>(
                      table: (
                          { id?: string; inputs: I; referenceOutputs?: O } & Record<
                              string,
                              any,
                          >
                      )[],
                      config?: LangSmithJestlikeWrapperConfig,
                  ) => (
                      name: string,
                      fn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void;
                  only: <
                      I extends Record<string, any> = Record<string, any>,
                      O extends Record<string, any> = Record<string, any>,
                  >(
                      name: string,
                      lsParams: LangSmithJestlikeWrapperParams<I, O>,
                      testFn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void & {
                      each: <I extends KVMap, O extends KVMap>(
                          table: (
                              { id?: ...; inputs: ...; referenceOutputs?: ... } & Record<
                                  (...),
                                  (...),
                              >
                          )[],
                          config?: LangSmithJestlikeWrapperConfig,
                      ) => (
                          name: string,
                          fn: LangSmithJestlikeTestFunction<I, O>,
                          timeout?: number,
                      ) => void;
                  };
                  skip: <
                      I extends Record<string, any> = Record<string, any>,
                      O extends Record<string, any> = Record<string, any>,
                  >(
                      name: string,
                      lsParams: LangSmithJestlikeWrapperParams<I, O>,
                      testFn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void & {
                      each: <I extends KVMap, O extends KVMap>(
                          table: (
                              { id?: ...; inputs: ...; referenceOutputs?: ... } & Record<
                                  (...),
                                  (...),
                              >
                          )[],
                          config?: LangSmithJestlikeWrapperConfig,
                      ) => (
                          name: string,
                          fn: LangSmithJestlikeTestFunction<I, O>,
                          timeout?: number,
                      ) => void;
                  };
              };
              each: <I extends KVMap, O extends KVMap>(
                  table: (
                      { id?: string; inputs: I; referenceOutputs?: O } & Record<
                          string,
                          any,
                      >
                  )[],
                  config?: LangSmithJestlikeWrapperConfig,
              ) => (
                  name: string,
                  fn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void;
              only: <
                  I extends Record<string, any> = Record<string, any>,
                  O extends Record<string, any> = Record<string, any>,
              >(
                  name: string,
                  lsParams: LangSmithJestlikeWrapperParams<I, O>,
                  testFn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void & {
                  each: <I extends KVMap, O extends KVMap>(
                      table: (
                          { id?: string; inputs: I; referenceOutputs?: O } & Record<
                              string,
                              any,
                          >
                      )[],
                      config?: LangSmithJestlikeWrapperConfig,
                  ) => (
                      name: string,
                      fn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void;
              };
              skip: <
                  I extends Record<string, any> = Record<string, any>,
                  O extends Record<string, any> = Record<string, any>,
              >(
                  name: string,
                  lsParams: LangSmithJestlikeWrapperParams<I, O>,
                  testFn: LangSmithJestlikeTestFunction<I, O>,
                  timeout?: number,
              ) => void & {
                  each: <I extends KVMap, O extends KVMap>(
                      table: (
                          { id?: string; inputs: I; referenceOutputs?: O } & Record<
                              string,
                              any,
                          >
                      )[],
                      config?: LangSmithJestlikeWrapperConfig,
                  ) => (
                      name: string,
                      fn: LangSmithJestlikeTestFunction<I, O>,
                      timeout?: number,
                  ) => void;
              };
          };
          toBeAbsoluteCloseTo: (
              received: string,
              expected: string,
              options?: AbsoluteCloseToMatcherOptions,
          ) => Promise<{ message: () => string; pass: boolean }>;
          toBeRelativeCloseTo: (
              received: string,
              expected: string,
              options?: RelativeCloseToMatcherOptions,
          ) => Promise<{ message: () => string; pass: boolean }>;
          toBeSemanticCloseTo: (
              received: string,
              expected: string,
              options: SemanticCloseToMatcherOptions,
          ) => Promise<{ message: () => string; pass: boolean }>;
      }