Skip to content

Commit

Permalink
Add test for isSupportedToolsFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael B. Gale committed Oct 5, 2023
1 parent 7380306 commit db9f2c5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/tools-features.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/tools-features.test.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions src/tools-features.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import test from "ava";

import { makeVersionInfo } from "./testing-utils";
import { ToolsFeature, isSupportedToolsFeature } from "./tools-features";

test("isSupportedToolsFeature", async (t) => {
const versionInfo = makeVersionInfo("1.0.0");

t.false(
isSupportedToolsFeature(
versionInfo,
ToolsFeature.IndirectTracingSupportsStaticBinaries,
),
);

versionInfo.features = { indirectTracingSupportsStaticBinaries: true };

t.true(
isSupportedToolsFeature(
versionInfo,
ToolsFeature.IndirectTracingSupportsStaticBinaries,
),
);
});

0 comments on commit db9f2c5

Please sign in to comment.