mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 19:05:45 +00:00
fix(javascript): retain property reads during updates (#508)
Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
1 parent
2df6b51ebb
commit
6b7923cdd2
3 files changed
+56
No files matched your search
@@ -170,6 +170,18 @@ it("projects built-in resource acquisition and release", () => {
|
||||
).toMatchObject({ status: "partial" });
|
||||
});
|
||||
|
||||
it.each(["+= 1", "++"])(
|
||||
"projects both property dependencies for %s",
|
||||
(operator) => {
|
||||
const graph = graphFor(`
|
||||
const source = { count: 1 };
|
||||
source.count ${operator};
|
||||
`);
|
||||
const relations = graph.relations.map(({ relation }) => relation);
|
||||
expect(relations).toContain("reads-property");
|
||||
expect(relations).toContain("writes-property");
|
||||
},
|
||||
);
|
||||
it("does not project a literal property slot for dynamic destructuring", () => {
|
||||
const graph = graphFor(`
|
||||
const source = { token: "TOKEN" };
|
||||
|
||||
Reference in new issue
Block a user