Skip to content

Add specs verifying single-item collection for observable queries#2091

Merged
einari merged 2 commits into
mainfrom
chore/specs-observable-query-single-item-collection
Apr 11, 2026
Merged

Add specs verifying single-item collection for observable queries#2091
einari merged 2 commits into
mainfrom
chore/specs-observable-query-single-item-collection

Conversation

@einari
Copy link
Copy Markdown
Contributor

@einari einari commented Apr 11, 2026

Added

  • Spec for QueryResult (Arc JS) verifying that a single-element array response for an enumerable query is kept as an array
  • Spec for useObservableQuery (Arc.React) verifying the hook data is an array when the server returns a single-item collection
  • Scenario specs for ProxyGenerator ControllerBased and ModelBound verifying a collection observable query with one item is treated as a collection with count 1

einari added 2 commits April 11, 2026 08:18
…peScript)

Verify that when an enumerable observable query receives a response with
a single item the result data is treated as an array, not unwrapped to a
scalar. Covers the Arc QueryResult unit level and the Arc.React
useObservableQuery hook.
…oxyGenerator)

Add ObserveSingleItemCollection endpoints to the controller-based and
model-bound test fixtures, and corresponding scenarios that verify the
JavaScript proxy treats a collection response with one item as an array
with count 1. Covers both ControllerBased and ModelBound scenarios.
@einari einari merged commit 18e22a9 into main Apr 11, 2026
7 checks passed
@einari einari deleted the chore/specs-observable-query-single-item-collection branch April 11, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant