langsmith
Advanced tools
Comparing version 0.2.16-rc.10 to 0.2.16-rc.11
@@ -5,2 +5,2 @@ export { Client, type ClientConfig, type LangSmithTracingClientInterface, } from "./client.js"; | ||
export { overrideFetchImplementation } from "./singletons/fetch.js"; | ||
export declare const __version__ = "0.2.16-rc.10"; | ||
export declare const __version__ = "0.2.16-rc.11"; |
@@ -5,2 +5,2 @@ export { Client, } from "./client.js"; | ||
// Update using yarn bump-version | ||
export const __version__ = "0.2.16-rc.10"; | ||
export const __version__ = "0.2.16-rc.11"; |
/// <reference types="jest" /> | ||
import { toBeRelativeCloseTo, toBeAbsoluteCloseTo, toBeSemanticCloseTo, type AbsoluteCloseToMatcherOptions, type SemanticCloseToMatcherOptions, type RelativeCloseToMatcherOptions } from "../utils/jestlike/matchers.js"; | ||
import type { SimpleEvaluator } from "../utils/jestlike/vendor/evaluatedBy.js"; | ||
import { logFeedback, logOutput } from "../utils/jestlike/index.js"; | ||
import { logFeedback, logOutputs } from "../utils/jestlike/index.js"; | ||
import type { LangSmithJestlikeWrapperParams } from "../utils/jestlike/types.js"; | ||
@@ -63,14 +63,14 @@ declare global { | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => 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: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
@@ -80,33 +80,33 @@ skip: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}, it: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => 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: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I; | ||
expected: O; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
@@ -116,18 +116,18 @@ skip: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I; | ||
expected: O; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I; | ||
expected: O; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}, describe: import("../utils/jestlike/types.js").LangSmithJestDescribeWrapper & { | ||
@@ -392,3 +392,3 @@ only: import("../utils/jestlike/types.js").LangSmithJestDescribeWrapper; | ||
* const response = await myApp(inputs); | ||
* ls.logOutput({ response }); | ||
* ls.logOutputs({ response }); | ||
* } | ||
@@ -399,3 +399,3 @@ * ); | ||
*/ | ||
logOutput, type LangSmithJestlikeWrapperParams, }; | ||
logOutputs, type LangSmithJestlikeWrapperParams, }; | ||
export * from "../utils/jestlike/types.js"; |
@@ -5,3 +5,3 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
import { toBeRelativeCloseTo, toBeAbsoluteCloseTo, toBeSemanticCloseTo, } from "../utils/jestlike/matchers.js"; | ||
import { logFeedback, logOutput } from "../utils/jestlike/index.js"; | ||
import { logFeedback, logOutputs } from "../utils/jestlike/index.js"; | ||
import { generateWrapperFromJestlikeMethods } from "../utils/jestlike/index.js"; | ||
@@ -275,3 +275,3 @@ jestExpect.extend({ | ||
* const response = await myApp(inputs); | ||
* ls.logOutput({ response }); | ||
* ls.logOutputs({ response }); | ||
* } | ||
@@ -282,3 +282,3 @@ * ); | ||
*/ | ||
logOutput, }; | ||
logOutputs, }; | ||
export * from "../utils/jestlike/types.js"; |
@@ -8,3 +8,3 @@ /// <reference types="jest" /> | ||
export declare function logFeedback(feedback: EvaluationResult): void; | ||
export declare function logOutput(output: Record<string, unknown>): void; | ||
export declare function logOutputs(output: Record<string, unknown>): void; | ||
export declare function generateWrapperFromJestlikeMethods(methods: Record<string, any>, testRunnerName: string): { | ||
@@ -14,14 +14,14 @@ test: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
} & Record<string, any>) => unknown | Promise<unknown>, 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: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: { | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void; | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void; | ||
}; | ||
@@ -31,18 +31,18 @@ skip: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: { | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void; | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void; | ||
}; | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void; | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void; | ||
}; | ||
@@ -52,14 +52,14 @@ it: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
} & Record<string, any>) => unknown | Promise<unknown>, 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: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: { | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void; | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void; | ||
}; | ||
@@ -69,18 +69,18 @@ skip: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: { | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void) & { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void; | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void; | ||
}; | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: { | ||
each: <I_1 extends KVMap, O_1 extends KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: LangSmithJestlikeWrapperConfig) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown | Promise<unknown>, timeout?: number) => void; | ||
} & Record<string, any>) => unknown | Promise<unknown>, timeout?: number) => void; | ||
}; | ||
@@ -87,0 +87,0 @@ describe: LangSmithJestDescribeWrapper & { |
@@ -41,3 +41,3 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
} | ||
export function logOutput(output) { | ||
export function logOutputs(output) { | ||
const context = testWrapperAsyncLocalStorageInstance.getStore(); | ||
@@ -249,3 +249,3 @@ if (context === undefined) { | ||
} | ||
const { config, inputs, expected } = lsParams; | ||
const { config, inputs, expected, ...rest } = lsParams; | ||
const totalRuns = config?.iterations ?? 1; | ||
@@ -276,3 +276,3 @@ for (let i = 0; i < totalRuns; i += 1) { | ||
if (loggedOutput !== undefined) { | ||
console.warn(`[WARN]: New "logOutput()" call will override output set by previous "logOutput()" call.`); | ||
console.warn(`[WARN]: New "logOutputs()" call will override output set by previous "logOutputs()" call.`); | ||
} | ||
@@ -289,2 +289,3 @@ loggedOutput = value; | ||
const res = await testFn({ | ||
...rest, | ||
inputs: testInput, | ||
@@ -304,3 +305,3 @@ expected: testOutput, | ||
if (loggedOutput !== undefined) { | ||
console.warn(`[WARN]: Returned value from test function will override output set by previous "logOutput()" call.`); | ||
console.warn(`[WARN]: Returned value from test function will override output set by previous "logOutputs()" call.`); | ||
} | ||
@@ -449,3 +450,8 @@ loggedOutput = | ||
const example = table[i]; | ||
wrapTestMethod(method)(`${name}, item ${i}`, { inputs: example.inputs, expected: example.expected, config }, fn, timeout); | ||
wrapTestMethod(method)(`${name}, item ${i}`, { | ||
...example, | ||
inputs: example.inputs, | ||
expected: example.expected, | ||
config, | ||
}, fn, timeout); | ||
} | ||
@@ -452,0 +458,0 @@ }; |
@@ -203,3 +203,3 @@ import { Table } from "console-table-printer"; | ||
const defaultColumns = [ | ||
{ name: "Test", alignment: "left", maxLen: 48 }, | ||
{ name: "Test", alignment: "left", maxLen: 36 }, | ||
{ name: "Inputs", alignment: "left", minLen: 24 }, | ||
@@ -206,0 +206,0 @@ { name: "Reference Outputs", alignment: "left", minLen: 24 }, |
@@ -5,3 +5,3 @@ /// <reference types="jest" /> | ||
import type { SimpleEvaluator } from "../utils/jestlike/vendor/evaluatedBy.js"; | ||
import { logFeedback, logOutput } from "../utils/jestlike/index.js"; | ||
import { logFeedback, logOutputs } from "../utils/jestlike/index.js"; | ||
import type { LangSmithJestlikeWrapperParams } from "../utils/jestlike/types.js"; | ||
@@ -62,14 +62,14 @@ interface CustomMatchers<R = unknown> { | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => 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: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
@@ -79,33 +79,33 @@ skip: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: { | ||
each: <I_1 extends import("../schemas.js").KVMap, O_1 extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I_1; | ||
expected: O_1; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I_1; | ||
expected: O_1; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}, it: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => 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: (data: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I; | ||
expected: O; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
@@ -115,18 +115,18 @@ skip: (<I extends Record<string, any> = Record<string, any>, O extends Record<string, any> = Record<string, any>>(name: string, lsParams: LangSmithJestlikeWrapperParams<I, O>, testFn: (data: { | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: { | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void) & { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I; | ||
expected: O; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}; | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: { | ||
each: <I extends import("../schemas.js").KVMap, O extends import("../schemas.js").KVMap>(table: ({ | ||
inputs: I; | ||
expected: O; | ||
}[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
} & Record<string, any>)[], config?: import("../utils/jestlike/types.js").LangSmithJestlikeWrapperConfig | undefined) => (name: string, fn: (params: { | ||
inputs: I; | ||
expected: O; | ||
}) => unknown, timeout?: number | undefined) => void; | ||
} & Record<string, any>) => unknown, timeout?: number | undefined) => void; | ||
}, describe: import("../utils/jestlike/types.js").LangSmithJestDescribeWrapper & { | ||
@@ -391,3 +391,3 @@ only: import("../utils/jestlike/types.js").LangSmithJestDescribeWrapper; | ||
* const response = await myApp(inputs); | ||
* ls.logOutput({ response }); | ||
* ls.logOutputs({ response }); | ||
* } | ||
@@ -398,3 +398,3 @@ * ); | ||
*/ | ||
logOutput, type LangSmithJestlikeWrapperParams, }; | ||
logOutputs, type LangSmithJestlikeWrapperParams, }; | ||
export * from "../utils/jestlike/types.js"; |
@@ -5,3 +5,3 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
import { toBeRelativeCloseTo, toBeAbsoluteCloseTo, toBeSemanticCloseTo, } from "../utils/jestlike/matchers.js"; | ||
import { logFeedback, logOutput } from "../utils/jestlike/index.js"; | ||
import { logFeedback, logOutputs } from "../utils/jestlike/index.js"; | ||
import { generateWrapperFromJestlikeMethods } from "../utils/jestlike/index.js"; | ||
@@ -275,3 +275,3 @@ vitestExpect.extend({ | ||
* const response = await myApp(inputs); | ||
* ls.logOutput({ response }); | ||
* ls.logOutputs({ response }); | ||
* } | ||
@@ -282,3 +282,3 @@ * ); | ||
*/ | ||
logOutput, }; | ||
logOutputs, }; | ||
export * from "../utils/jestlike/types.js"; |
{ | ||
"name": "langsmith", | ||
"version": "0.2.16-rc.10", | ||
"version": "0.2.16-rc.11", | ||
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", | ||
@@ -5,0 +5,0 @@ "packageManager": "yarn@1.22.19", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
967126
24605