Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jacob Heun <jacobheun@gmail.com>
  • Loading branch information
jacobheun authored and daviddias committed May 1, 2018
1 parent 172f96e commit e00974f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/full-s3-repo/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

const series = require('async/series')
const IPFS = require('ipfs')
const Repo = require('ipfs-repo')
const S3 = require('aws-sdk').S3
Expand Down
10 changes: 8 additions & 2 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ describe('S3Datastore', () => {

let bucketCreated = false
standin.replace(s3, 'upload', (stand, params, callback) => {
if (!bucketCreated) return callback({ code: 'NoSuchBucket' })
if (!bucketCreated) {
const err = { code: 'NoSuchBucket' }
return callback(err)
}
stand.restore()
return callback(null)
})
Expand All @@ -76,7 +79,10 @@ describe('S3Datastore', () => {

let bucketCreated = false
standin.replace(s3, 'upload', (stand, params, callback) => {
if (!bucketCreated) return callback({ code: 'NoSuchBucket' })
if (!bucketCreated) {
const err = { code: 'NoSuchBucket' }
return callback(err)
}
stand.restore()
return callback(null)
})
Expand Down

0 comments on commit e00974f

Please sign in to comment.