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:
parent
25f779c0f2
commit
ec42edcaab
14 changed files with 492 additions and 524 deletions
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue