LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Llms
  • Profile
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Matchers
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
UniversalHubNodeLoadSerializableEncoder BackedFile SystemIn Memory
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsLlmsProfileStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryMatchersToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coretestingmatchers
Moduleā—Since v1.1

testing/matchers

Copy
import { ... } from "@langchain/core/testing/matchers";

Functions

function
toContainToolCall→ ExpectationResult
function
toHaveBeenInterrupted→ ExpectationResult
function
toHaveStructuredResponse→ ExpectationResult
function
toHaveToolCallCount→ ExpectationResult
function
toHaveToolCalls→ ExpectationResult
function
toHaveToolMessages→ ExpectationResult

Interfaces

interface
LangChainMatchers

Variables

variable
langchainMatchers: __type

All matcher functions bundled for convenient use with expect.extend().

variable
toBeAIMessage: (this: ExpectExtendThis, received: unknown, expected?: string | Record<string, unknown>)
variable
toBeHumanMessage: (this: ExpectExtendThis, received: unknown, expected?: string | Record<string, unknown>)
variable
toBeSystemMessage: (this: ExpectExtendThis, received: unknown, expected?: string | Record<string, unknown>)
variable
toBeToolMessage: (this: ExpectExtendThis, received: unknown, expected?: string | Record<string, unknown>)
View source on GitHub