File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { getRunnerLogger } from "./logging";
1515import { parseRepositoryNwo } from "./repository" ;
1616import {
1717 getRecordingLogger ,
18+ initializeFeatures ,
1819 LoggedMessage ,
1920 mockCodeQLVersion ,
2021 mockFeatureFlagApiEndpoint ,
@@ -552,13 +553,6 @@ function assertAllFeaturesUndefinedInApi(
552553 }
553554}
554555
555- export function initializeFeatures ( initialValue : boolean ) {
556- return Object . keys ( featureConfig ) . reduce ( ( features , key ) => {
557- features [ key ] = initialValue ;
558- return features ;
559- } , { } ) ;
560- }
561-
562556function setUpFeatureFlagTests (
563557 tmpDir : string ,
564558 logger = getRunnerLogger ( true ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import * as sinon from "sinon";
55
66import * as actionsUtil from "./actions-util" ;
77import { Feature , FeatureEnablement } from "./feature-flags" ;
8- import { initializeFeatures } from "./feature-flags.test" ;
98import { getRunnerLogger } from "./logging" ;
109import * as setupCodeql from "./setup-codeql" ;
1110import {
@@ -14,6 +13,7 @@ import {
1413 SAMPLE_DEFAULT_CLI_VERSION ,
1514 SAMPLE_DOTCOM_API_DETAILS ,
1615 getRecordingLogger ,
16+ initializeFeatures ,
1717 mockBundleDownloadApi ,
1818 setupActionsVars ,
1919 setupTests ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import * as defaults from "./defaults.json";
1414import {
1515 CodeQLDefaultVersionInfo ,
1616 Feature ,
17+ featureConfig ,
1718 FeatureEnablement ,
1819} from "./feature-flags" ;
1920import { Logger } from "./logging" ;
@@ -263,6 +264,13 @@ export function createFeatures(enabledFeatures: Feature[]): FeatureEnablement {
263264 } ;
264265}
265266
267+ export function initializeFeatures ( initialValue : boolean ) {
268+ return Object . keys ( featureConfig ) . reduce ( ( features , key ) => {
269+ features [ key ] = initialValue ;
270+ return features ;
271+ } , { } ) ;
272+ }
273+
266274/**
267275 * Mocks the API for downloading the bundle tagged `tagName`.
268276 *
You can’t perform that action at this time.
0 commit comments