Add test for isSupportedToolsFeature
This commit is contained in:
parent
738030674f
commit
db9f2c5968
3 changed files with 40 additions and 0 deletions
24
src/tools-features.test.ts
Normal file
24
src/tools-features.test.ts
Normal file
|
|
@ -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,
|
||||
),
|
||||
);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue