diff --git a/test/create-output-stream.test.js b/test/create-output-stream.test.js index 3031fa2..42d2b9e 100644 --- a/test/create-output-stream.test.js +++ b/test/create-output-stream.test.js @@ -1,16 +1,17 @@ var assert = require('assert') var fs = require('fs') var path = require('path') -var testutil = require('testutil') +var os = require('os') var fse = require('../') /* global afterEach, beforeEach, describe, it */ -var TEST_DIR = '' - describe('createOutputStream', function () { - beforeEach(function () { - TEST_DIR = testutil.createTestDir('fs-extra') + var TEST_DIR + + beforeEach(function (done) { + TEST_DIR = path.join(os.tmpdir(), 'fs-extra', 'create') + fse.emptyDir(TEST_DIR, done) }) afterEach(function (done) { diff --git a/test/create.test.js b/test/create.test.js index dd08329..8d7b596 100644 --- a/test/create.test.js +++ b/test/create.test.js @@ -1,16 +1,17 @@ var assert = require('assert') var fs = require('fs') var path = require('path') -var testutil = require('testutil') +var os = require('os') var fse = require('../') /* global afterEach, beforeEach, describe, it */ -var TEST_DIR = '' - describe('fs-extra', function () { - beforeEach(function () { - TEST_DIR = testutil.createTestDir('fs-extra') + var TEST_DIR + + beforeEach(function (done) { + TEST_DIR = path.join(os.tmpdir(), 'fs-extra', 'create') + fse.emptyDir(TEST_DIR, done) }) afterEach(function (done) { diff --git a/test/ensure.test.js b/test/ensure.test.js index 0f7abbf..ab065f8 100644 --- a/test/ensure.test.js +++ b/test/ensure.test.js @@ -1,16 +1,17 @@ var assert = require('assert') var fs = require('fs') var path = require('path') -var testutil = require('testutil') +var os = require('os') var fse = require('../') /* global afterEach, beforeEach, describe, it */ -var TEST_DIR = '' - describe('fs-extra', function () { - beforeEach(function () { - TEST_DIR = testutil.createTestDir('fs-extra') + var TEST_DIR + + beforeEach(function (done) { + TEST_DIR = path.join(os.tmpdir(), 'fs-extra', 'ensure') + fse.emptyDir(TEST_DIR, done) }) afterEach(function (done) {