Skip to content

Commit

Permalink
update the error tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hayk-simonyan committed Nov 27, 2024
1 parent 9fe7730 commit 36e077b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/error-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const tape = require('tape');
const LambdaError = require('../lib/error');
const _ = require('lodash');

// Add a TEST tag to our errors
LambdaError.config({
Expand Down Expand Up @@ -31,7 +30,7 @@ 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');
t.same(err.extra, expectedExtra, 'Extra metadata merged correctly');
t.same(err.request, expectedRequest, 'Request data preserved');
t.end();
});
Expand Down

0 comments on commit 36e077b

Please sign in to comment.