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 Scope.with, if an overriden property is deleted from child context, it should not reappear from parent context.
This is currently not supported because it adds a priori a lot of complexity (we need to track which property from the root object were overriden and then deleted, in addition to remove this flag if it's set again, and everything without impacting parent context).
The following test case can be used to test this behaviour:
test("all")("Scope.with() contexts operates unidirectionaly when value is overidden from parent (delete operation)",()=>{consta=newContext({d: 0})constb=a.with<testing>({d: 1})constlisteners={a: fn(),b: fn()}a.addEventListener("change",listeners.a)b.addEventListener("change",listeners.b)deleteb.target.dexpect(a.target.d).toBe(0)expect(b.target.d).toBeUndefined()expect(a.target).toHaveProperty("d")expect(b.target).not.toHaveProperty("d")expect(listeners.a).toHaveBeenCalledTimes(0)expect(listeners.b).toHaveBeenCalledTimes(1)})
The text was updated successfully, but these errors were encountered:
When using
Scope.with
, if an overriden property is deleted from child context, it should not reappear from parent context.This is currently not supported because it adds a priori a lot of complexity (we need to track which property from the root object were overriden and then deleted, in addition to remove this flag if it's set again, and everything without impacting parent context).
The following test case can be used to test this behaviour:
The text was updated successfully, but these errors were encountered: