You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using serialize-javascript through any jest test (in the test or in code run from a test), the output is affected by jest itself.
Specifically, when serializing a function, line returns are added within the function itself. Potentially, maybe, this is because jest modifies the Function.prototype.toString method?
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
When using serialize-javascript through any jest test (in the test or in code run from a test), the output is affected by jest itself.
Specifically, when serializing a function, line returns are added within the function itself. Potentially, maybe, this is because jest modifies the Function.prototype.toString method?
To Reproduce
(Alternatively, see https://gist.github.com/eslachance/6dbd88820f09de4509d4f19c4c0e7ad6 for reproduction)
The output of this is:
Expected behavior
Output should be in a single line.
Link to repl or repo (highly encouraged)
https://gist.github.com/eslachance/6dbd88820f09de4509d4f19c4c0e7ad6
envinfo
The text was updated successfully, but these errors were encountered: