Skip to content

Commit 37e3d77

Browse files
committed
adding test coverage ignore if node version less than 16
1 parent 695182a commit 37e3d77

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

aws-distro-opentelemetry-node-autoinstrumentation/test/otlp-aws-span-exporter.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ const EXPECTED_AUTH_SECURITY_TOKEN = 'test_token';
1818

1919
const nodeVersion = getNodeVersion();
2020

21-
if (nodeVersion >= 16) {
21+
/* istanbul ignore if */
22+
if (nodeVersion < 16) {
23+
it.skip(`Skipping tests - Node.js version ${nodeVersion} is below required version 16`, () => {});
24+
} else {
2225
describe('OTLPAwsSpanExporter', () => {
2326
let sandbox: sinon.SinonSandbox;
2427
let scope: nock.Scope;
@@ -167,6 +170,4 @@ if (nodeVersion >= 16) {
167170
await exporter.export([], () => {});
168171
});
169172
});
170-
} else {
171-
it.skip(`Skipping tests - Node.js version ${nodeVersion} is below required version 16`, () => {});
172173
}

0 commit comments

Comments
 (0)