Fix GHAE CodeQL setup test

This commit is contained in:
Henry Mercer 2023-01-10 12:58:15 +00:00
parent 9203e314a3
commit 9f8ddbdfd7
6 changed files with 41 additions and 10 deletions

3
lib/testing-utils.js generated
View file

@ -21,6 +21,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFeatures = exports.mockCodeQLVersion = exports.mockLanguagesInRepo = exports.mockFeatureFlagApiEndpoint = exports.getRecordingLogger = exports.setupActionsVars = exports.setupTests = void 0;
const github = __importStar(require("@actions/github"));
const nock = __importStar(require("nock"));
const sinon = __importStar(require("sinon"));
const apiClient = __importStar(require("./api-client"));
const CodeQL = __importStar(require("./codeql"));
@ -85,6 +86,8 @@ function setupTests(test) {
if (!t.passed) {
process.stdout.write(t.context.testOutput);
}
// Undo any modifications made by nock
nock.cleanAll();
// Undo any modifications made by sinon
sinon.restore();
// Undo any modifications to the env