How to use the cleanupSync function from temp

Find comprehensive JavaScript temp.cleanupSync code examples handpicked from public code repositorys.

301
302
303
304
305
306
307
308
309
310
  if (options.failOnError && fileCounters.error > 0) {
    process.exit(1);
  }
}
if (usedRemoteScript) {
  temp.cleanupSync();
}
return Object.assign({
  stats: statsCounter,
  timeElapsed: timeElapsed
fork icon470
star icon0
watch icon0

27
28
29
30
31
32
33
34
35
36
});

afterEach(function() {
  CompileCache.setCacheDirectory(originalCacheDir);
  try {
    return temp.cleanupSync();
  } catch (error) {}
});

describe('when a .js file starts with /** @babel */;', () =>
fork icon0
star icon0
watch icon1

84
85
86
87
88
89
90
91
92
93

afterEach(() => {
  delete process.env.ATOM_HOME
  fs.removeSync(electronUserDataPath)
  try {
    temp.cleanupSync()
  } catch (e) {
    // Ignore
  }
  app.setPath('userData', defaultElectronUserDataPath)
fork icon0
star icon0
watch icon0