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
it('should clone a getter',()=>{constinput={a: 2,getfoo(){returnthis.a*2}}letclone=func(input)assert.ok(clone.foo===4)assert.ok(typeofObject.getOwnPropertyDescriptor(clone,'foo').get==='function')})it('should clone a setter',()=>{constinput={setfoo(val){this.a=val}}letclone=func(input)clone.foo('bar')assert.ok(clone.a==='bar')assert.ok(input.a===undefined)assert.ok(typeofObject.getOwnPropertyDescriptor(clone,'foo').set==='function')})
The text was updated successfully, but these errors were encountered:
bertolo1988
changed the title
Not cloning getters and setters as expected
Not cloning object getters and setters as expected
Oct 9, 2022
The following tests should not fail:
The text was updated successfully, but these errors were encountered: