add tests for config-utils

This commit is contained in:
Robert Brignull 2020-05-05 17:32:58 +01:00
parent 6507fba7ec
commit 0e6df42024
10 changed files with 647 additions and 93 deletions

3
lib/util.js generated
View file

@ -337,8 +337,9 @@ exports.getToolNames = getToolNames;
// Mostly intended for use within tests.
async function withTmpDir(body) {
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codeql-action-'));
await body(tmpDir);
const result = await body(tmpDir);
fs.rmdirSync(tmpDir, { recursive: true });
return result;
}
exports.withTmpDir = withTmpDir;
//# sourceMappingURL=util.js.map