add tests for config-utils
This commit is contained in:
parent
6507fba7ec
commit
0e6df42024
10 changed files with 647 additions and 93 deletions
3
lib/util.js
generated
3
lib/util.js
generated
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue