- Notifications
You must be signed in to change notification settings - Fork 98
Closed
Labels
Description
Operating System
- Linux
- Windows 7
- Windows 10
- MacOS
- other:
NodeJS Version
- 0.x
- 4.x
- 6.x
- 7.x
- other: 10.16.0
Tmp Version
0.1.0
Expected Behavior
const tmp = require('tmp'); const fs = require('fs'); const tmpobj = tmp.fileSync(); console.log(`Created ${tmpobj.name}`); tmpobj.removeCallback(); console.log(`Still exists: ${fs.existsSync(tmpobj.name)}`); setImmediate(() => { console.log(`Still exists after setImmediate: ${fs.existsSync(tmpobj.name)}`); }); removeCallback() is described as synchronous. Running the code above, I would expect both console.log statements checking for the removed file to return false.
Experienced Behavior
removeCallback() isn't really synchronous, it is just an asynchronous operation that doesn't provide a promise or callback. Is this the intended behavior?