Skip to content

Commit ef422c4

Browse files
committed
Fix callbacks
1 parent 9171206 commit ef422c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/runTest.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ async function main() {
4040
const extensionTestsPath = path.resolve(__dirname, './suite/index');
4141

4242
const testWorkspace = path.resolve(__dirname, '../../test-workspace');
43+
console.log(`Test workspace: ${testWorkspace}`);
4344

4445
if (!fs.existsSync(testWorkspace)) {
4546
fs.mkdirSync(testWorkspace);
@@ -54,11 +55,11 @@ async function main() {
5455
});
5556

5657
console.log('Test workspace contents: ');
57-
forDirContents(testWorkspace, () => console.log);
58+
forDirContents(testWorkspace, (file, absPath) => console.log(absPath));
5859
if (exitCode === 0) {
5960
console.log(`Tests were succesfull, deleting test workspace in ${testWorkspace}`);
60-
forDirContents(testWorkspace, (file: fs.Dirent) => {
61-
return file.isDirectory() ? fs.rmdirSync : fs.unlinkSync;
61+
forDirContents(testWorkspace, (file, absPath) => {
62+
return file.isDirectory() ? fs.rmdirSync(absPath) : fs.unlinkSync(absPath);
6263
});
6364
}
6465
} catch (err) {

0 commit comments

Comments
 (0)