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

Commit e00974f

Browse files
jacobheundaviddias
authored andcommitted
fix: linting
License: MIT Signed-off-by: Jacob Heun <[email protected]>
1 parent 172f96e commit e00974f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

examples/full-s3-repo/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict'
22

3-
const series = require('async/series')
43
const IPFS = require('ipfs')
54
const Repo = require('ipfs-repo')
65
const S3 = require('aws-sdk').S3

test/index.spec.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ describe('S3Datastore', () => {
5757

5858
let bucketCreated = false
5959
standin.replace(s3, 'upload', (stand, params, callback) => {
60-
if (!bucketCreated) return callback({ code: 'NoSuchBucket' })
60+
if (!bucketCreated) {
61+
const err = { code: 'NoSuchBucket' }
62+
return callback(err)
63+
}
6164
stand.restore()
6265
return callback(null)
6366
})
@@ -76,7 +79,10 @@ describe('S3Datastore', () => {
7679

7780
let bucketCreated = false
7881
standin.replace(s3, 'upload', (stand, params, callback) => {
79-
if (!bucketCreated) return callback({ code: 'NoSuchBucket' })
82+
if (!bucketCreated) {
83+
const err = { code: 'NoSuchBucket' }
84+
return callback(err)
85+
}
8086
stand.restore()
8187
return callback(null)
8288
})

0 commit comments

Comments
 (0)