mirror of
https://github.com/github/codeql-action.git
synced 2025-12-11 18:24:43 +08:00
Refactoring: Create interface for config initialization
This eliminates argument order mistakes, and also lets us add new inputs without having to update every test.
This commit is contained in:
4
lib/testing-utils.js
generated
4
lib/testing-utils.js
generated
@@ -33,7 +33,7 @@ const github = __importStar(require("@actions/github"));
|
||||
const nock_1 = __importDefault(require("nock"));
|
||||
const sinon = __importStar(require("sinon"));
|
||||
const apiClient = __importStar(require("./api-client"));
|
||||
const CodeQL = __importStar(require("./codeql"));
|
||||
const codeql = __importStar(require("./codeql"));
|
||||
const util_1 = require("./util");
|
||||
exports.SAMPLE_DOTCOM_API_DETAILS = {
|
||||
auth: "token",
|
||||
@@ -74,7 +74,7 @@ function setupTests(test) {
|
||||
typedTest.beforeEach((t) => {
|
||||
// Set an empty CodeQL object so that all method calls will fail
|
||||
// unless the test explicitly sets one up.
|
||||
CodeQL.setCodeQL({});
|
||||
codeql.setCodeQL({});
|
||||
// Replace stdout and stderr so we can record output during tests
|
||||
t.context.testOutput = "";
|
||||
const processStdoutWrite = process.stdout.write.bind(process.stdout);
|
||||
|
||||
Reference in New Issue
Block a user