chore(test): automatically cleanup temp files generated during tests

pull/210/head
Romain 4 years ago
parent c407873266
commit 946a1d3a6d

@ -1,5 +1,6 @@
const path = require('path')
const requireAll = require('require-all')
const tmp = require('tmp')
// require all source code
// so that the coverage report is accurate
@ -10,3 +11,7 @@ requireAll(path.join(__dirname, '..', 'src'))
process.on('unhandledRejection', err => {
throw err
})
// Automatically delete temporary files/folders
// Created during the tests
tmp.setGracefulCleanup()

Loading…
Cancel
Save