Skip to content

test: Refactor LangChain versioned tests#3624

Merged
amychisholm03 merged 6 commits intonewrelic:mainfrom
amychisholm03:NR-3623/refactor-langchain-tests
Dec 29, 2025
Merged

test: Refactor LangChain versioned tests#3624
amychisholm03 merged 6 commits intonewrelic:mainfrom
amychisholm03:NR-3623/refactor-langchain-tests

Conversation

@amychisholm03
Copy link
Contributor

@amychisholm03 amychisholm03 commented Dec 23, 2025

Description

This PR refactors the tests in test/versioned/langchain. Before it had sub folders, openai and bedrock, to test the @langchain/openai and @langchain/aws integration respectively. The package.json contained dependencies for both of these, creating a large test version matrix.

To reduce the matrix size, langchain/openai was moved to langchain-openai and langchain/bedrock to langchain-aws. Because the vectorstore, runnables, and runnables-streaming tests for both packages test the same LangChain functionality, except for the LLM and client, I created a centralized test suite abstraction, see vectorstore.js, runnables.js, and runnables-streaming.js in the langchain folder.

How to Test

npm run versioned:major langchain
npm run versioned:major langchain-aws
npm run versioned:major langchain-openai

Related Issues

Closes #3623

@amychisholm03 amychisholm03 added the dev:tests Indicates only changes to tests label Dec 23, 2025
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.72%. Comparing base (d1e90e4) to head (68783db).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3624      +/-   ##
==========================================
+ Coverage   89.39%   97.72%   +8.32%     
==========================================
  Files         437      438       +1     
  Lines       57537    57552      +15     
  Branches        1        1              
==========================================
+ Hits        51435    56240    +4805     
+ Misses       6102     1312    -4790     
Flag Coverage Δ
integration-tests-cjs-20.x 73.50% <ø> (?)
integration-tests-cjs-22.x 73.54% <ø> (ø)
integration-tests-esm-20.x 52.67% <ø> (?)
unit-tests-20.x 89.08% <ø> (?)
versioned-tests-20.x 80.84% <ø> (-0.28%) ⬇️
versioned-tests-22.x 80.84% <ø> (-0.30%) ⬇️
versioned-tests-24.x 80.78% <ø> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amychisholm03 amychisholm03 force-pushed the NR-3623/refactor-langchain-tests branch from 3064fd5 to efabe85 Compare December 23, 2025 19:09
@amychisholm03 amychisholm03 changed the title refactor: LangChain tests test: Refactor LangChain versioned tests Dec 23, 2025
@amychisholm03 amychisholm03 force-pushed the NR-3623/refactor-langchain-tests branch from 18e3090 to 37200b6 Compare December 23, 2025 20:43
@amychisholm03 amychisholm03 force-pushed the NR-3623/refactor-langchain-tests branch from da1a6c5 to bfcf686 Compare December 23, 2025 21:29
@amychisholm03 amychisholm03 marked this pull request as ready for review December 23, 2025 21:29
@amychisholm03 amychisholm03 merged commit 12ae601 into newrelic:main Dec 29, 2025
44 checks passed
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board Dec 29, 2025
@amychisholm03 amychisholm03 deleted the NR-3623/refactor-langchain-tests branch December 29, 2025 17:52
@github-actions github-actions bot mentioned this pull request Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev:tests Indicates only changes to tests

Projects

Status: Done: Issues recently completed

Development

Successfully merging this pull request may close these issues.

Refactor LangChain versioned tests

2 participants

Comments