cccf51f9bf
Smoke tests the different fs methods. Not perfect in any world, but better than nothing.
19 lines
514 B
JavaScript
19 lines
514 B
JavaScript
const { mkdtemp } = require('fs/promises')
|
|
const os = require('os')
|
|
const path = require('path')
|
|
const rimraf = require('rimraf')
|
|
|
|
async function runTests() {
|
|
const tempdir = await mkdtemp(path.join(os.tmpdir(), 'nexe-'))
|
|
process.on('beforeExit', () => rimraf.sync(tempdir))
|
|
process.chdir(tempdir)
|
|
const Mocha = require('mocha')
|
|
const mocha = new Mocha()
|
|
mocha.addFile('test/integration/tests.integration-spec.js')
|
|
mocha.run((failures) => {
|
|
process.exitCode = failures ? 1 : 0
|
|
})
|
|
}
|
|
|
|
runTests()
|