mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Reset mocks in test so they don't leak into later test
This commit is contained in:
4
lib/config-utils.test.js
generated
4
lib/config-utils.test.js
generated
@@ -135,7 +135,8 @@ ava_1.default("Octokit not used when reading local config", async (t) => {
|
||||
return await util.withTmpDir(async (tmpDir) => {
|
||||
process.env['RUNNER_TEMP'] = tmpDir;
|
||||
process.env['GITHUB_WORKSPACE'] = tmpDir;
|
||||
const spyKit = sinon_1.default.spy(octokit, "Octokit");
|
||||
const sandbox = sinon_1.default.createSandbox();
|
||||
const spyKit = sandbox.spy(octokit, "Octokit");
|
||||
const inputFileContents = `
|
||||
name: my config
|
||||
disable-default-queries: true
|
||||
@@ -150,6 +151,7 @@ ava_1.default("Octokit not used when reading local config", async (t) => {
|
||||
setInput('config-file', 'input');
|
||||
await configUtils.loadConfig();
|
||||
t.false(spyKit.called);
|
||||
sandbox.restore();
|
||||
});
|
||||
});
|
||||
ava_1.default("Remote and local configuration paths correctly identified", t => {
|
||||
|
||||
Reference in New Issue
Block a user