Skip to content

Commit db9f2c5

Browse files
committed
Add test for isSupportedToolsFeature
1 parent 7380306 commit db9f2c5

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

lib/tools-features.test.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tools-features.test.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tools-features.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import test from "ava";
2+
3+
import { makeVersionInfo } from "./testing-utils";
4+
import { ToolsFeature, isSupportedToolsFeature } from "./tools-features";
5+
6+
test("isSupportedToolsFeature", async (t) => {
7+
const versionInfo = makeVersionInfo("1.0.0");
8+
9+
t.false(
10+
isSupportedToolsFeature(
11+
versionInfo,
12+
ToolsFeature.IndirectTracingSupportsStaticBinaries,
13+
),
14+
);
15+
16+
versionInfo.features = { indirectTracingSupportsStaticBinaries: true };
17+
18+
t.true(
19+
isSupportedToolsFeature(
20+
versionInfo,
21+
ToolsFeature.IndirectTracingSupportsStaticBinaries,
22+
),
23+
);
24+
});

0 commit comments

Comments
 (0)