mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-25 16:42:57 +00:00
23 lines
537 B
JavaScript
23 lines
537 B
JavaScript
var assert = require('assert')
|
|
var path = require('path')
|
|
var fse = require('../')
|
|
var testutil = require('testutil')
|
|
|
|
var TEST_DIR;
|
|
|
|
describe('native fs', function() {
|
|
beforeEach(function() {
|
|
TEST_DIR = testutil.createTestDir('fs-extra')
|
|
})
|
|
|
|
afterEach(function(done) {
|
|
fse.remove(TEST_DIR, done)
|
|
})
|
|
|
|
it('should use native fs methods', function() {
|
|
var file = path.join(TEST_DIR, 'write.txt')
|
|
fse.writeFileSync(file, 'hello')
|
|
var data = fse.readFileSync(file, 'utf8')
|
|
assert.equal(data, 'hello')
|
|
})
|
|
}) |