test('should catch error if file exists', function (done) {
    var promise = thenWriteJson('./foobar.txt', {foo: 'bar'})

    promise.catch(function (err) {
      test.ifError(!err)