Skip to content

Commit 3c86c82

Browse files
committed
fix test
1 parent 37200b6 commit 3c86c82

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/versioned/langchain-aws/vectorstore.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ test.beforeEach(async (ctx) => {
6767
})
6868

6969
test.afterEach(async (ctx) => {
70+
await ctx.nr?.vs?.deleteIfExists()
7071
ctx.nr?.server?.destroy()
7172
helper.unloadAgent(ctx.nr.agent)
7273
// bust the require-cache so it can re-instrument

test/versioned/langchain-openai/vectorstore.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ test.beforeEach(async (ctx) => {
5757
})
5858

5959
test.afterEach(async (ctx) => {
60+
await ctx.nr?.vs?.deleteIfExists()
6061
ctx.nr?.server?.close()
6162
helper.unloadAgent(ctx.nr.agent)
6263
// bust the require-cache so it can re-instrument

test/versioned/langchain/vectorstore.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,21 @@ const helper = require('../../lib/agent_helper')
2323
/**
2424
* Runs the common vectorstore test suite
2525
* @param {object} config Configuration for the test suite
26-
* @param {string} config.langchainCoreVersion The version of @langchain/core package
2726
* @param {string} config.searchQuery The query string to use for similarity search
2827
* @param {string} [config.expectedQuery] The expected query in assertions (defaults to searchQuery)
2928
* @param {string} [config.expectedPageContent] The expected page content in vector search results
3029
* @param {object} [config.errorAssertion] Custom error assertion function
3130
*/
3231
function runVectorstoreTests(config) {
3332
const {
34-
langchainCoreVersion,
3533
searchQuery,
3634
expectedQuery = searchQuery,
3735
expectedPageContent,
3836
errorAssertion
3937
} = config
4038

4139
test('should log tracking metrics', function(t) {
42-
const { agent } = t.nr
40+
const { agent, langchainCoreVersion } = t.nr
4341
assertPackageMetrics({ agent, pkg: '@langchain/core', version: langchainCoreVersion })
4442
})
4543

0 commit comments

Comments
 (0)