Skip to content

Conversation

@johnchen05
Copy link
Contributor

@johnchen05 johnchen05 commented Jan 24, 2026

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?

@sap-email-compliance
Copy link

SAP employees are expected to use their SAP-email address for commits related to their work. Our compliance check has detected usage of an email other than a SAP one by a SAP employee. Please update your pull request accordingly.

If you think this is wrong or need any assistance, please contact ospo@sap.com.

@cla-assistant
Copy link

cla-assistant bot commented Jan 24, 2026

CLA assistant check
All committers have signed the CLA.

@johnchen05 johnchen05 closed this Jan 26, 2026
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.

1 participant