Skip to content

Commit f530ce8

Browse files
committed
lint fixups
1 parent 2d4de45 commit f530ce8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/functional/aws-node-sdk/test/mdSearch/basicSearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ runIfMongo('Basic search', () => {
4444
{ Key: hiddenKey },
4545
],
4646
},
47-
}))
47+
}));
4848
await s3Client.send(new DeleteBucketCommand({ Bucket: bucketName }));
4949
});
5050

tests/functional/aws-node-sdk/test/mdSearch/utils/helpers.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,16 @@ testUtils.runAndCheckSearch = (s3Client, bucketName, encodedSearch, listVersions
4747
// Add middleware to inject the search query parameter
4848
// SDK v3 automatically encodes query parameters, so we decode first to avoid double-encoding
4949
command.middlewareStack.add(
50-
(next) => async (args) => {
50+
next => async args => {
5151
if (!args.request.query) {
52+
// eslint-disable-next-line no-param-reassign
5253
args.request.query = {};
5354
}
5455
// Decode the already-encoded search string since SDK v3 will encode it again
56+
// eslint-disable-next-line no-param-reassign
5557
args.request.query.search = decodeURIComponent(encodedSearch);
5658
if (listVersions) {
59+
// eslint-disable-next-line no-param-reassign
5760
args.request.query.versions = '';
5861
}
5962

@@ -88,7 +91,7 @@ testUtils.runAndCheckSearch = (s3Client, bucketName, encodedSearch, listVersions
8891
} else {
8992
if (testResult && typeof testResult === 'object' && testResult.code) {
9093
// This was expected to be an error, but we got success
91-
return done(new Error('Expected error but got success'));
94+
done(new Error('Expected error but got success'));
9295
}
9396
if (testResult) {
9497
assert(res.Contents[0], 'should be Contents listed');
@@ -98,17 +101,16 @@ testUtils.runAndCheckSearch = (s3Client, bucketName, encodedSearch, listVersions
98101
assert.strictEqual(res.Contents?.length, undefined);
99102
}
100103
}
101-
return done();
104+
done();
102105
} catch (err) {
103106
if (testResult && typeof testResult === 'object' && testResult.code) {
104107
assert.strictEqual(err.name, testResult.code);
105108
assert.strictEqual(err.message, testResult.message);
106-
return done();
109+
done();
107110
}
108-
return done(err);
111+
done(err);
109112
}
110113
};
111-
112114
makeRequest();
113115
};
114116

0 commit comments

Comments
 (0)