Skip to content

Commit ba9fafa

Browse files
committed
Make ESM test standalone
1 parent 44e37ea commit ba9fafa

File tree

1 file changed

+4
-1
lines changed
  • plugins/node/opentelemetry-instrumentation-pg/test

1 file changed

+4
-1
lines changed

plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ describe('pg', () => {
160160
if (testPostgresLocally) {
161161
testUtils.cleanUpDocker('postgres');
162162
}
163+
163164
await client.end();
164165
});
165166

@@ -1087,7 +1088,9 @@ describe('pg', () => {
10871088
});
10881089
});
10891090
});
1091+
});
10901092

1093+
describe('pg (ESM)', () => {
10911094
it('should work with ESM usage', async () => {
10921095
await testUtils.runTestFixture({
10931096
cwd: __dirname,
@@ -1109,7 +1112,7 @@ describe('pg', () => {
11091112
assert.strictEqual(spans[0].kind, 3);
11101113
assert.strictEqual(spans[1].name, 'test-span');
11111114
assert.strictEqual(spans[1].kind, 1);
1112-
assert.strictEqual(spans[2].name, 'pg.query:SELECT postgres');
1115+
assert.strictEqual(spans[2].name, 'pg.query:SELECT otel_pg_database');
11131116
assert.strictEqual(spans[2].kind, 3);
11141117
},
11151118
});

0 commit comments

Comments
 (0)