Skip to content

Commit 47968c1

Browse files
committed
fix test
1 parent b56edaa commit 47968c1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

test/versioned/langchain/tools.test.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,20 @@ test.afterEach((ctx) => {
3939
removeMatchedModules(/custom-tool\.js$/)
4040
})
4141

42-
test('should log tracking metrics', function(t) {
43-
const { agent } = t.nr
42+
test('should log tracking metrics', function(t, end) {
43+
t.plan(5)
44+
const { agent, tool, input } = t.nr
4445
const { version } = require('@langchain/core/package.json')
45-
assertPackageMetrics({ agent, pkg: '@langchain/core', version })
46+
helper.runInTransaction(agent, async () => {
47+
await tool.call(input)
48+
assertPackageMetrics({
49+
agent,
50+
pkg: '@langchain/core',
51+
version,
52+
subscriberType: true
53+
}, { assert: t.assert })
54+
end()
55+
})
4656
})
4757

4858
test('should create span on successful tools create', (t, end) => {

0 commit comments

Comments
 (0)