Skip to content

Commit a554b70

Browse files
chore(otlp-exporter-base): add legacy agent factory test
1 parent 775606a commit a554b70

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
node_version:
1515
- "18.19.0"
1616
- "18"
17-
- "20.6.0"
17+
- "20.6.1" # `import`ing cjs code is broken on 20.6.0
1818
- "20"
1919
- "22"
2020
- "23"
@@ -40,7 +40,7 @@ jobs:
4040
if: ${{
4141
matrix.node_version == '18.19.0' ||
4242
matrix.node_version == '18' ||
43-
matrix.node_version == '20.6.0'
43+
matrix.node_version == '20.6.1'
4444
}}
4545
- run: npm install -g npm@latest
4646
if: ${{

experimental/packages/otlp-exporter-base/test/node/configuration/convert-legacy-node-otlp-http-options.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ describe('convertLegacyHttpOptions', function () {
4141
);
4242
});
4343

44+
it('should keep agent factory as-is', function () {
45+
// act
46+
const factory = () => null!;
47+
const options = convertLegacyHttpOptions(
48+
{ httpAgentOptions: factory },
49+
'SIGNAL',
50+
'v1/signal',
51+
{}
52+
);
53+
54+
// assert
55+
assert.strictEqual(options.agent, factory);
56+
});
57+
4458
it('should keep specific keepAlive', async () => {
4559
// act
4660
const options = convertLegacyHttpOptions(

0 commit comments

Comments
 (0)