More renaming

Avoid usage of "Feature Flag" unless we are talking specifically about
the response from github features api. Otherwise, use terms like
"Toggleable features".

Note both "toggleable" and "togglable" appear to be valid spellings of
the word. I chose the first for no good reason.
This commit is contained in:
Andrew Eisenberg 2022-10-07 11:33:32 -07:00
parent b27aed78f5
commit 1a17c59fb0
39 changed files with 237 additions and 200 deletions

15
lib/testing-utils.js generated
View file

@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.mockCodeQLVersion = exports.mockFeatureFlagApiEndpoint = exports.getRecordingLogger = exports.setupActionsVars = exports.setupTests = void 0;
exports.createFeatureFlags = exports.mockCodeQLVersion = exports.mockFeatureFlagApiEndpoint = exports.getRecordingLogger = exports.setupActionsVars = exports.setupTests = void 0;
const github = __importStar(require("@actions/github"));
const sinon = __importStar(require("sinon"));
const apiClient = __importStar(require("./api-client"));
@ -152,4 +152,17 @@ function mockCodeQLVersion(version) {
};
}
exports.mockCodeQLVersion = mockCodeQLVersion;
/**
* Create a feature enablement instance with the specified set of enabled features.
*
* This should be only used within tests.
*/
function createFeatureFlags(enabledFeatures) {
return {
getValue: async (feature) => {
return enabledFeatures.includes(feature);
},
};
}
exports.createFeatureFlags = createFeatureFlags;
//# sourceMappingURL=testing-utils.js.map