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
const{ deepStrictEqual }=require("assert");consta={};constb={};a.x=1;Object.defineProperties(b,{x: {value: 1,writable: true,},y: {value: 5,writable: true,enumerable: true,configurable: true,},});console.log({ a, b });deepStrictEqual(a,b);// does not assertdeepStrictEqual(b,a);// does assert
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
I expect deepStrictEqual to be at least commutative. (Whether it should handle non-enumerable properties may be up for discussion)
What do you see instead?
deepStrictEqual(b, a) does throw an assertion while deepStrictEqual(a, b) does not.
Additional information
If you point me in the right direction I'm willing to fix it myself.
The text was updated successfully, but these errors were encountered:
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
I expect deepStrictEqual to be at least commutative. (Whether it should handle non-enumerable properties may be up for discussion)
What do you see instead?
deepStrictEqual(b, a)
does throw an assertion whiledeepStrictEqual(a, b)
does not.Additional information
If you point me in the right direction I'm willing to fix it myself.
The text was updated successfully, but these errors were encountered: