Skip to content

Commit

Permalink
chore(instrumentation-aws-lambda): test missing module
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael-theriault-swi committed Jun 21, 2024
1 parent 81081ed commit 6452504
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,19 @@ describe('lambda handler', () => {
});
});

describe('non-existent handler module', () => {
it('should skip instrumentation', async () => {
initializeHandler('lambda-test/callback.handle');

const handler = await lambdaLoadHandler('lambda-test/async.handler');
const result = await handler('arg', ctx);

assert.strictEqual(result, 'ok');
const spans = memoryExporter.getFinishedSpans();
assert.strictEqual(spans.length, 0);
});
});

describe('non-existent handler function', () => {
it('should skip instrumentation', async () => {
initializeHandler('lambda-test/async.handle');
Expand Down

0 comments on commit 6452504

Please sign in to comment.