bolt
bolt copied to clipboard
Rules simulator does not support multi-location updates.
There is no way to write a test for a multi-location update in the simulator since all writes are to an atomic location and sequential.
Expect a way to test a multi-location write scenario.
A couple ideas of ways to implement this:
- With no change to API - but treat successive writes (between succeeds or fails statements) as a multi-location update.
- Add a
.update({"path-1": <value-1>, "path-2": <value-2>);
API. - Add explicit grouping command around multi-location updates:
.beginUpdate()
.at(<path>)
.write(<data>)
.at(<path>)
.write(<data>)
.endUpdate()
.succeeds(<reason>)
I'm leaning to the last approach as being most consistent with the current testing API.
hey @mckoss I was wondering if there was any progress on this?
I'm itching to get back to more work on Bolt and address the outstanding PR's I have in flight. I'm hopeful and can return to working on this in the next few weeks - I've been working on some other projects for the last few months.
Hello, Any update on this ? we are using updates all over the places in our JS code, and could need a way to test the rules. perhaps using "patch" ???
I really need this as well, any updates?
+1