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
The expect.equal() method is failing because of #4118
This happened:
Something like this:
│ AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
│
│ {
│ producer_result: {
│ result: 12
│ }
│ }
│
│ at Util.equal (/var/folders/vm/cm444l3124j_vh_8rkhz6kqm0000gn/T/wing-bundles-XhI7xo/index.js:5449:26)
│ at $Closure1.handle (/var/folders/vm/cm444l3124j_vh_8rkhz6kqm0000gn/T/wing-bundles-XhI7xo/index.js:34:38)
│ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
└ at async exports.handler (/var/folders/vm/cm444l3124j_vh_8rkhz6kqm0000gn/T/wing-bundles-XhI7xo/index.js:5685:10)
I expected this:
To work
Is there a workaround?
stringify the objects
Component
SDK
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
@skorfmann until we fix the VM issue that's the root cause, let's just change the expect.equal library to use JSON.stringify() in case it compares to objects, ok?
Community Notes
Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.
The text was updated successfully, but these errors were encountered:
Yes, that's a bit annoying :) However, this will behave differently though
Object properties are compared unordered.
Map keys and Set items are compared unordered.
So, this will be breaking change when going back to a non stringified comparison.
If that's acceptable then let's change it. Alternatively, a user should be able to do stringify the values in such cases as well. Don't know how frequent that is.
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!
I tried this:
The
expect.equal()
method is failing because of #4118This happened:
Something like this:
I expected this:
To work
Is there a workaround?
stringify the objects
Component
SDK
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
@skorfmann until we fix the VM issue that's the root cause, let's just change the expect.equal library to use
JSON.stringify()
in case it compares to objects, ok?Community Notes
The text was updated successfully, but these errors were encountered: