Skip to content

Commit

Permalink
Try to debut what's up
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Jan 30, 2025
1 parent 7e8a610 commit e4d43a5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/aws-cdk/test/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,29 @@ describe('constructs version', () => {
workDir,
});

console.log('workDir', workDir);

// Function to recursively list directory contents
async function recursiveListFiles(rdir: string): Promise<string[]> {
const ret = new Array<string>();
await recurse(rdir);
return ret;

async function recurse(dir: string) {
for (const name of await fs.readdir(dir)) {
const fullPath = path.join(dir, name);
if ((await fs.stat(fullPath)).isDirectory()) {
await recurse(fullPath);
} else {
ret.push(fullPath);
}
}
}
}

// Log the directory contents
console.log('Directory contents:', await recursiveListFiles(workDir));

// Check that package.json and bin/ got created in the current directory
expect(await fs.pathExists(path.join(workDir, 'package.json'))).toBeTruthy();
expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy();
Expand Down

0 comments on commit e4d43a5

Please sign in to comment.