Skip to content

Commit 4713fa6

Browse files
committed
update ai test
1 parent 5ad9401 commit 4713fa6

File tree

1 file changed

+5
-12
lines changed
  • dev-packages/node-integration-tests/suites/tracing/ai

1 file changed

+5
-12
lines changed

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

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { join } from 'node:path';
2-
import { afterAll, describe, expect, test } from 'vitest';
1+
import { afterAll, describe, expect } from 'vitest';
32
import { cleanupChildProcesses, createEsmAndCjsTests } from '../../../utils/runner';
43

54
// `ai` SDK only support Node 18+
@@ -126,15 +125,9 @@ describe('ai', () => {
126125
]),
127126
};
128127

129-
test('creates ai related spans - cjs', async () => {
130-
await createRunner(__dirname, 'scenario.js').expect({ transaction: EXPECTED_TRANSACTION }).start().completed();
131-
});
132-
133-
test('creates ai related spans - esm', async () => {
134-
await createRunner(__dirname, 'scenario.mjs')
135-
.withFlags('--import', join(__dirname, 'instrument.mjs'))
136-
.expect({ transaction: EXPECTED_TRANSACTION })
137-
.start()
138-
.completed();
128+
createEsmAndCjsTests(__dirname, 'scenario.mjs', 'instrument.mjs', (createRunner, test) => {
129+
test('creates ai related spans ', async () => {
130+
await createRunner().expect({ transaction: EXPECTED_TRANSACTION }).start().completed();
131+
});
139132
});
140133
});

0 commit comments

Comments
 (0)