Skip to content

Conversation

@johnchen05
Copy link
Contributor

For long time, I was puzzled on: in our UT, when we spy on logMessage, we never get the properties _error
image

image

I thought it should be the test engine(jest, vitest) issue. but no matter what engine I use, this keeps happening.
recent days, I fork and read the cf-nodejs-logging-support code. I found the root cause.
the _error is deleted from the lastArg obj. then when the input args is checked, _error has not been inside.

image

When I remove this "delete" from my node_module code, my UT case pass.

I went through your whole logic, I think this delete lastArg._error should not be necessary.

would you mind I remove this line as a fix?

@johnchen05 johnchen05 marked this pull request as ready for review January 26, 2026 06:29
@christiand93 christiand93 self-requested a review January 27, 2026 11:56
Copy link
Member

@christiand93 christiand93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi John,
Thank you for your contribution. Please see my comment below.

Copy link
Member

@christiand93 christiand93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good 🦘

@christiand93 christiand93 merged commit b8fb03a into SAP:main Jan 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants