From 5952bbd0ae907f442b7ed5de24d44ea5a41349f9 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 24 Sep 2024 23:34:25 -0400 Subject: [PATCH] test: orchestration exports - adds test to ensure @agoric/orchestration exports are reachable from js - also documents what is exported via a snapshot --- .../test/orchestration-imports.test.js | 6 + .../orchestration-imports.test.js.md | 532 ++++++++++++++++++ .../orchestration-imports.test.js.snap | Bin 0 -> 3425 bytes 3 files changed, 538 insertions(+) create mode 100644 packages/builders/test/orchestration-imports.test.js create mode 100644 packages/builders/test/snapshots/orchestration-imports.test.js.md create mode 100644 packages/builders/test/snapshots/orchestration-imports.test.js.snap diff --git a/packages/builders/test/orchestration-imports.test.js b/packages/builders/test/orchestration-imports.test.js new file mode 100644 index 00000000000..170baab24ad --- /dev/null +++ b/packages/builders/test/orchestration-imports.test.js @@ -0,0 +1,6 @@ +import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; +import * as orch from '@agoric/orchestration'; + +test('@agoric/orchestration exports', t => { + t.snapshot(orch); +}); diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md new file mode 100644 index 00000000000..b5c7b79b235 --- /dev/null +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -0,0 +1,532 @@ +# Snapshot report for `test/orchestration-imports.test.js` + +The actual snapshot is saved in `orchestration-imports.test.js.snap`. + +Generated by [AVA](https://avajs.dev). + +## @agoric/orchestration exports + +> Snapshot 1 + + @Module { + AmountArgShape: Object @match:or { + payload: [ + { + brand: Object @match:remotable { + payload: { + label: 'Brand', + }, + }, + value: Object @match:nat { + payload: [], + }, + }, + { + denom: Object @match:string { + payload: [], + }, + value: Object @match:bigint { + payload: [], + }, + }, + ], + }, + AnyNatAmountShape: { + brand: Object @match:remotable { + payload: { + label: 'Brand', + }, + }, + value: Object @match:nat { + payload: [], + }, + }, + AnyNatAmountsRecord: Object @match:and { + payload: [ + Object @match:recordOf { + payload: [ + Object @match:string { + payload: [], + }, + { + brand: Object @match:remotable { + payload: { + label: 'Brand', + }, + }, + value: Object @match:nat { + payload: [], + }, + }, + ], + }, + Object @match:not { + payload: {}, + }, + ], + }, + ChainAddressShape: { + chainId: Object @match:string { + payload: [], + }, + encoding: Object @match:string { + payload: [], + }, + value: Object @match:string { + payload: [], + }, + }, + ChainInfoShape: Object @match:splitRecord { + payload: [ + { + chainId: Object @match:string { + payload: [], + }, + }, + ], + }, + CosmosAssetInfoShape: Object @match:splitRecord { + payload: [ + { + base: Object @match:string { + payload: [], + }, + denom_units: Object @match:arrayOf { + payload: [ + Object @match:splitRecord { + payload: [ + { + denom: Object @match:string { + payload: [], + }, + exponent: Object @match:kind { + payload: 'number', + }, + }, + ], + }, + ], + }, + display: Object @match:string { + payload: [], + }, + name: Object @match:string { + payload: [], + }, + symbol: Object @match:string { + payload: [], + }, + }, + ], + }, + CosmosChainInfoShape: Object @match:splitRecord { + payload: [ + { + chainId: Object @match:string { + payload: [], + }, + }, + { + connections: Object @match:recordOf { + payload: [ + Object @match:any { + payload: undefined, + }, + Object @match:any { + payload: undefined, + }, + ], + }, + icqEnabled: Object @match:kind { + payload: 'boolean', + }, + stakingTokens: Object @match:arrayOf { + payload: [ + { + denom: Object @match:string { + payload: [], + }, + }, + ], + }, + }, + ], + }, + DelegationShape: Object @match:splitRecord { + payload: [ + { + amount: Object @match:or { + payload: [ + { + brand: Object @match:remotable { + payload: { + label: 'Brand', + }, + }, + value: Object @match:nat { + payload: [], + }, + }, + { + denom: Object @match:string { + payload: [], + }, + value: Object @match:bigint { + payload: [], + }, + }, + ], + }, + validator: { + chainId: Object @match:string { + payload: [], + }, + encoding: Object @match:string { + payload: [], + }, + value: Object @match:string { + payload: [], + }, + }, + }, + { + delegator: { + chainId: Object @match:string { + payload: [], + }, + encoding: Object @match:string { + payload: [], + }, + value: Object @match:string { + payload: [], + }, + }, + }, + ], + }, + DenomAmountShape: { + denom: Object @match:string { + payload: [], + }, + value: Object @match:bigint { + payload: [], + }, + }, + DenomInfoShape: { + base: Object @match:remotable { + payload: { + label: 'Chain', + }, + }, + baseDenom: Object @match:string { + payload: [], + }, + brand: Object @match:or { + payload: [ + Object @match:remotable { + payload: { + label: 'Brand', + }, + }, + Object @match:kind { + payload: 'undefined', + }, + ], + }, + chain: Object @match:remotable { + payload: { + label: 'Chain', + }, + }, + }, + DenomShape: Object @match:string { + payload: [], + }, + IBCChannelIDShape: Object @match:string { + payload: [], + }, + IBCChannelInfoShape: Object @match:splitRecord { + payload: [ + { + channelId: Object @match:string { + payload: [], + }, + counterPartyChannelId: Object @match:string { + payload: [], + }, + counterPartyPortId: Object @match:string { + payload: [], + }, + ordering: Object @match:scalar { + payload: undefined, + }, + portId: Object @match:string { + payload: [], + }, + state: Object @match:scalar { + payload: undefined, + }, + version: Object @match:string { + payload: [], + }, + }, + ], + }, + IBCConnectionIDShape: Object @match:string { + payload: [], + }, + IBCConnectionInfoShape: Object @match:splitRecord { + payload: [ + { + client_id: Object @match:string { + payload: [], + }, + counterparty: { + client_id: Object @match:string { + payload: [], + }, + connection_id: Object @match:string { + payload: [], + }, + }, + id: Object @match:string { + payload: [], + }, + state: Object @match:scalar { + payload: undefined, + }, + transferChannel: Object @match:splitRecord { + payload: [ + { + channelId: Object @match:string { + payload: [], + }, + counterPartyChannelId: Object @match:string { + payload: [], + }, + counterPartyPortId: Object @match:string { + payload: [], + }, + ordering: Object @match:scalar { + payload: undefined, + }, + portId: Object @match:string { + payload: [], + }, + state: Object @match:scalar { + payload: undefined, + }, + version: Object @match:string { + payload: [], + }, + }, + ], + }, + }, + ], + }, + IBCTransferOptionsShape: Object @match:splitRecord { + payload: [ + {}, + { + memo: Object @match:string { + payload: [], + }, + timeoutHeight: { + revisionHeight: Object @match:bigint { + payload: [], + }, + revisionNumber: Object @match:bigint { + payload: [], + }, + }, + timeoutTimestamp: Object @match:bigint { + payload: [], + }, + }, + ], + }, + ICQMsgShape: Object @match:splitRecord { + payload: [ + { + data: Object @match:string { + payload: [], + }, + path: Object @match:string { + payload: [], + }, + }, + { + height: Object @match:string { + payload: [], + }, + prove: Object @match:kind { + payload: 'boolean', + }, + }, + ], + }, + LocalChainAccountShape: Object @match:remotable { + payload: { + label: 'LocalChainAccount', + }, + }, + OutboundConnectionHandlerI: Object @guard:interfaceGuard { + payload: { + defaultGuards: undefined, + interfaceName: 'OutboundConnectionHandler', + methodGuards: { + onClose: Object @guard:methodGuard { + payload: { + argGuards: [ + Object @match:any { + payload: undefined, + }, + Object @match:any { + payload: undefined, + }, + Object @match:any { + payload: undefined, + }, + ], + callKind: 'async', + optionalArgGuards: undefined, + restArgGuard: undefined, + returnGuard: Object @match:any { + payload: undefined, + }, + }, + }, + onOpen: Object @guard:methodGuard { + payload: { + argGuards: [ + Object @match:any { + payload: undefined, + }, + Object @match:string { + payload: [], + }, + Object @match:string { + payload: [], + }, + Object @match:any { + payload: undefined, + }, + ], + callKind: 'async', + optionalArgGuards: undefined, + restArgGuard: undefined, + returnGuard: Object @match:any { + payload: undefined, + }, + }, + }, + }, + }, + }, + Proto3Shape: { + typeUrl: Object @match:string { + payload: [], + }, + value: Object @match:string { + payload: [], + }, + }, + TimestampProtoShape: { + nanos: Object @match:kind { + payload: 'number', + }, + seconds: Object @match:string { + payload: [], + }, + }, + TxBodyOptsShape: Object @match:splitRecord { + payload: [ + {}, + { + extensionOptions: Object @match:arrayOf { + payload: [ + Object @match:any { + payload: undefined, + }, + ], + }, + memo: Object @match:string { + payload: [], + }, + nonCriticalExtensionOptions: Object @match:arrayOf { + payload: [ + Object @match:any { + payload: undefined, + }, + ], + }, + timeoutHeight: Object @match:bigint { + payload: [], + }, + }, + ], + }, + TypedJsonShape: Object @match:splitRecord { + payload: [ + { + '@type': Object @match:string { + payload: [], + }, + }, + ], + }, + chainFacadeMethods: { + getChainInfo: Object @guard:methodGuard { + payload: { + argGuards: [], + callKind: 'sync', + optionalArgGuards: undefined, + restArgGuard: undefined, + returnGuard: Object @match:tagged { + payload: [ + 'Vow', + Object @match:splitRecord { + payload: [ + { + vowV0: Object @match:remotable { + payload: { + label: 'VowV0', + }, + }, + }, + ], + }, + ], + }, + }, + }, + makeAccount: Object @guard:methodGuard { + payload: { + argGuards: [], + callKind: 'sync', + optionalArgGuards: undefined, + restArgGuard: undefined, + returnGuard: Object @match:tagged { + payload: [ + 'Vow', + Object @match:splitRecord { + payload: [ + { + vowV0: Object @match:remotable { + payload: { + label: 'VowV0', + }, + }, + }, + ], + }, + ], + }, + }, + }, + }, + prepareChainHubAdmin: Function prepareChainHubAdmin {}, + prepareCosmosInterchainService: Function prepareCosmosInterchainService {}, + withOrchestration: Function withOrchestration {}, + } diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..e5d97ebf415f59caba0d33b38a48a5b932e61f47 GIT binary patch literal 3425 zcmV-n4W9BrRzV#K~J)V zx9BtYsvnC800000000BcT5D_^)fN8kt{?lby}N#U?IeCAUauV>Kp+qT!FHU)BIih@cLgrFov3O@=hMJ26x6n+4efR<7M z5^1CYEi9I|OKK@`X3pipgsddv z=g3NYQdBiX(2}y$Db8eMMN^ZiBxKY{SyT5tl1K=euzle*Zd616$2_d#b^vz)cnZMl z0KNb)j{(aWATr=K1{`F-D-8G-1AH#vEEllR1q2Htf8)fK>!3ZQ{i)iD-gRqNzLHYEmwL9kk|cCb3euC4$YnH#J!#Oemqa#qp? zm5EK0LPj+3?{Ro&P?}vYXeO&b`2k01;3?`xF)k|!gLIg;Gdw9IrNKl(5mmKd=RMvP zgEA_O%LTl#vVb=Z%W7Iy2US(n?5vf=tP-|nI96bVm=Y(9B`gpg=Lo?Sq9mv3u%F}@ zbq2%U#osvGXW#|w?;I8y9U2~<6eLMZjjkwAKH(@09L3g0R~0u{og_<=7}rO_n~HF( zW;@GfZ9B(n866tltO$}iE-GUgoy)D%Z5+`*I(+3imD@2#`QFybaUo?ccRX&NzmGXy zcr2^M{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