var assert = require('assert')
var path = require('path')
var os = require('os')
var fs = require('fs')
var fse = require('../')

/* global afterEach, beforeEach, describe, it */

describe('native fs', function () {
  var TEST_DIR

  beforeEach(function (done) {
    TEST_DIR = path.join(os.tmpdir(), 'fs-extra', 'native-fs')
    fse.emptyDir(TEST_DIR, done)
  })

  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')
  })

  it('should have native fs constants', function () {
    // Node.js v0.12 / IO.js
    if ('F_OK' in fs) {
      assert.equal(fse.F_OK, fs.F_OK)
    }
  })
})

@@ -1,115 +1,136 @@
-var assert = require('assert')%0Avar path = require('path')%0Avar os = require('os')%0Avar fs = require('fs')%0Avar fse
+'use strict'%0A%0Aconst os = require('os')%0Aconst fs = require('fs')%0Aconst fse = require('../')%0Aconst path = require('path')%0Aconst assert
  = r
@@ -137,19 +137,22 @@
 equire('
-../
+assert
 ')%0A%0A/* g
@@ -215,35 +215,29 @@
 native fs', 
-function ()
+() =%3E
  %7B%0A  var TES
@@ -255,32 +255,24 @@
 foreEach
-(function 
 (done
-)
+ =%3E
  %7B%0A    T
@@ -383,24 +383,16 @@
 Each
-(function 
 (done
-)
+ =%3E
  %7B%0A 
@@ -460,35 +460,29 @@
 s methods', 
-function ()
+() =%3E
  %7B%0A    var f
@@ -685,19 +685,13 @@
 s', 
-function ()
+() =%3E
  %7B%0A 

Refactor test fs-integration