jprichardson / node-jsonfile

Easily read/write JSON files.
MIT License
1.2k stars 321 forks source link

Unit tests failed on Node.js 6.2.1 #48

Closed kuy closed 8 years ago

kuy commented 8 years ago

I noticed that node-jsonfile's unit tests failed on Node.js 6.2.1. https://travis-ci.org/kuy/node-jsonfile/jobs/135610969

kuy commented 8 years ago

I'm working on this issue. In v6.2.1, rimraf() doesn't execute the given callback function. But rimraf passes unit tests without errors on v6.

NG

  beforeEach(function (done) {
    TEST_DIR = path.join(os.tmpdir(), 'jsonfile-tests-readfile-sync')
    rimraf(TEST_DIR, function () {
      fs.mkdir(TEST_DIR, done)
    })
  })

  afterEach(function (done) {
    rimraf(TEST_DIR, done)
  })

OK

  beforeEach(function (done) {
    TEST_DIR = path.join(os.tmpdir(), 'jsonfile-tests-readfile-sync')
    rimraf.sync(TEST_DIR)
    fs.mkdirSync(TEST_DIR)
    done()
  })

  afterEach(function (done) {
    rimraf.sync(TEST_DIR)
    done()
  })
jprichardson commented 8 years ago

Excellent, thanks for looking at this. PR accepted.

kuy commented 8 years ago

Already accepted? (or typo?) It doesn't look so... Can I continue to tackle this issue and send PR?

jprichardson commented 8 years ago

Can I continue to tackle this issue and send PR?

Yes, sounds great.