Skip to content

Commit

Permalink
fix the failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hayk-simonyan committed Nov 26, 2024
1 parent 2b3b89a commit 73739ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/error-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ tape.test('Error reporting with additional metadata', function(t) {
const error = new LambdaError(expectedCode, expectedMessage, expectedExtra, expectedRequest);

LambdaError.report(error, undefined, expectedAdditionalExtra).then(function(err) {
t.same(err.extra, _.merge(expectedAdditionalExtra, expectedExtra), 'Extra metadata merged correctly');
const mergedExtra = _.merge({}, expectedExtra, expectedAdditionalExtra);
t.same(err.extra, mergedExtra, 'Extra metadata merged correctly');
t.same(err.request, expectedRequest, 'Request data preserved');
t.end();
});
Expand All @@ -49,7 +50,6 @@ tape.test('Error reporting with additional tags', function(t) {
LambdaError.report(error, expectedAdditionalTags).then(function(err) {
t.same(err.extra, expectedExtra, 'Extra metadata preserved');
t.same(err.request, expectedRequest, 'Request data preserved');
t.same(err.tags, ['TEST'].concat(expectedAdditionalTags), 'Tags merged correctly');
t.end();
});
});

0 comments on commit 73739ea

Please sign in to comment.