SIGN IN SIGN UP

test: cover the tool error boundary, gid handling and tool behavior

Takes the suite from 26 to 52 tests, covering three areas that had none.

test/util.test.ts exercises wrap() — the error boundary every one of the
13 tools routes through — asserting that a ShopifyApiError keeps its
status and errors, a plain Error surfaces its message, and a non-Error
throw is not swallowed. Also covers the toGid/parseGid pair and the
shared pagination args.

test/tool-calls.test.ts drives real tools through a real MCP client over
an in-memory transport with only fetch faked, so a call exercises the
tool schema, the query module and the GraphQL client together. It pins
the versioned admin endpoint, the pagination defaults, numeric-id to gid
normalization, the id-or-handle branch, and that shopify_graphql rejects
a mutation before any network call.

Verified the coverage is real rather than incidental: breaking toGid
fails 4 of the new tests across both files.
O
Olivier Louvignes committed
d2e69cf9798fcd21cb564634adbef10f194076b6
Parent: b33449d