Skip to content

Commit

Permalink
exp
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenWeatherford committed Mar 24, 2022
1 parent c09e05d commit 01134c1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/vscode-bicep/src/test/e2e/createBicepConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import os from "os";

import { executeCreateConfigFileCommand } from "./commands";
import {} from "fs";
import { getLogger } from "../../utils/logger";

describe("bicep.createConfigFile", (): void => {
afterEach(async () => {
Expand Down Expand Up @@ -82,18 +83,25 @@ describe("bicep.createConfigFile", (): void => {

function createUniqueTempFolder(filenamePrefix: string): string {
const tempFolder = os.tmpdir();

getLogger().info(`tempFolder: ${tempFolder}`);
getLogger().info(`fse.existsSync(tempFolder): ${fse.existsSync(tempFolder)}`);
if (!fse.existsSync(tempFolder)) {
console.log(`Creating ${tempFolder}`);
getLogger().info(`Creating ${tempFolder}`);
fse.mkdirSync(tempFolder);
console.log(`Created ${tempFolder}`);
getLogger().info(`Created ${tempFolder}`);
}
getLogger().info(`fse.existsSync(tempFolder): ${fse.existsSync(tempFolder)}`);

const tempSubfolder = fse.mkdtempSync(path.join(tempFolder, filenamePrefix));
if (!fse.existsSync(tempSubfolder)) {
console.log(`Creating ${tempSubfolder}`);
getLogger().info(`Creating ${tempSubfolder}`);
fse.mkdirSync(tempSubfolder);
console.log(`Created ${tempSubfolder}`);
getLogger().info(`Created ${tempSubfolder}`);
}
getLogger().info(
`fse.existsSync(tempSubfolder): ${fse.existsSync(tempSubfolder)}`
);

return tempSubfolder;
}

0 comments on commit 01134c1

Please sign in to comment.