Skip to content

Commit 7912b20

Browse files
committed
Format test file
1 parent db1daef commit 7912b20

File tree

1 file changed

+18
-23
lines changed
  • dev-packages/node-integration-tests/suites/tracing/langgraph

1 file changed

+18
-23
lines changed

dev-packages/node-integration-tests/suites/tracing/langgraph/test.ts

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -401,28 +401,23 @@ describe('LangGraph integration', () => {
401401

402402
const streamingLongContent = 'A'.repeat(50_000);
403403

404-
createEsmAndCjsTests(
405-
__dirname,
406-
'scenario-no-truncation.mjs',
407-
'instrument-streaming.mjs',
408-
(createRunner, test) => {
409-
test('automatically disables truncation when span streaming is enabled', async () => {
410-
await createRunner()
411-
.expect({
412-
span: container => {
413-
const spans = container.items;
404+
createEsmAndCjsTests(__dirname, 'scenario-no-truncation.mjs', 'instrument-streaming.mjs', (createRunner, test) => {
405+
test('automatically disables truncation when span streaming is enabled', async () => {
406+
await createRunner()
407+
.expect({
408+
span: container => {
409+
const spans = container.items;
414410

415-
const chatSpan = spans.find(
416-
s => s.attributes?.[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]?.value?.includes(streamingLongContent),
417-
);
418-
expect(chatSpan).toBeDefined();
419-
},
420-
})
421-
.start()
422-
.completed();
423-
});
424-
},
425-
);
411+
const chatSpan = spans.find(s =>
412+
s.attributes?.[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]?.value?.includes(streamingLongContent),
413+
);
414+
expect(chatSpan).toBeDefined();
415+
},
416+
})
417+
.start()
418+
.completed();
419+
});
420+
});
426421

427422
createEsmAndCjsTests(
428423
__dirname,
@@ -437,8 +432,8 @@ describe('LangGraph integration', () => {
437432

438433
// With explicit enableTruncation: true, truncation keeps only the last message
439434
// and drops the long content. The result should NOT contain the full 50k 'A' string.
440-
const chatSpan = spans.find(
441-
s => s.attributes?.[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]?.value?.includes('Follow-up question'),
435+
const chatSpan = spans.find(s =>
436+
s.attributes?.[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]?.value?.includes('Follow-up question'),
442437
);
443438
expect(chatSpan).toBeDefined();
444439
expect(chatSpan!.attributes[GEN_AI_INPUT_MESSAGES_ATTRIBUTE].value).not.toContain(streamingLongContent);

0 commit comments

Comments
 (0)