LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Compat
  • Event
  • Llms
  • Openai Completions Stream
  • Profile
  • Stream
  • 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
  • Testing
  • 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
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScriptlangchainindexLangChainMatchers
Interfaceā—Since v1.2

LangChainMatchers

LangChain Testing Utilities

Copy
interface LangChainMatchers

Bases

StreamMatchers<R>

Methods

Inherited fromStreamMatchers(@langchain/core)

Methods

MtoHaveStreamOutputMtoHaveStreamReasoningMtoHaveStreamTextMtoHaveStreamToolCalls
View source on GitHub
M
toHaveStreamUsage
method
toBeAIMessage→ R
method
toBeHumanMessage→ R
method
toBeSystemMessage→ R
method
toBeToolMessage→ R
method
toContainToolCall→ R
method
toHaveBeenInterrupted→ R
method
toHaveStreamOutput→ R
method
toHaveStreamReasoning→ R
method
toHaveStreamText→ R
method
toHaveStreamToolCalls→ R
method
toHaveStreamUsage→ R
method
toHaveStructuredResponse→ R
method
toHaveToolCallCount→ R
method
toHaveToolCalls→ R
method
toHaveToolMessages→ R

Asserts that the final streamed output message matches the expected fields.

Asserts that the stream resolves to the expected concatenated reasoning text.

Asserts that the stream resolves to the expected concatenated text.

Asserts that the stream resolves to the expected ordered tool calls.

Asserts that the stream resolves to usage metadata matching the expected fields.