Skip to content

Commit d9b43d3

Browse files
committed
fixup
1 parent cc1bd5a commit d9b43d3

4 files changed

Lines changed: 217 additions & 242 deletions

File tree

tests/functional/aws-node-sdk/lib/utility/checkError.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ const assert = require('assert');
22

33
function checkError(err, code, statusCode) {
44
assert(err, 'Expected error but found none');
5-
assert.strictEqual(err.name, code);
6-
assert.strictEqual(err.$metadata.httpStatusCode, statusCode);
5+
if (code) {
6+
assert.strictEqual(err.name, code);
7+
}
8+
if (statusCode) {
9+
assert.strictEqual(err.$metadata.httpStatusCode, statusCode);
10+
}
711
}
812

913
module.exports = checkError;

tests/functional/aws-node-sdk/test/object/deleteObjTagging.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe('DELETE object taggings', () => {
6666
Bucket: bucketName,
6767
Key: objectName,
6868
}));
69-
assert.strictEqual(dataGet.TagSet, undefined);
69+
assert.strictEqual(dataGet.TagSet.length, 0);
7070
});
7171

7272
it('should delete a non-existing tag set', async () => {
@@ -78,7 +78,7 @@ describe('DELETE object taggings', () => {
7878
Bucket: bucketName,
7979
Key: objectName
8080
}));
81-
assert.strictEqual(dataGet.TagSet, undefined);
81+
assert.strictEqual(dataGet.TagSet.length, 0);
8282
});
8383

8484
it('should return NoSuchKey deleting tag set to a non-existing object',

0 commit comments

Comments
 (0)