Skip to content

Commit

Permalink
test: exports (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
tien authored Feb 11, 2025
1 parent 4b34f16 commit 3c507dd
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/core/src/actions/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"aggregateWallets",
"connectWallet",
"disconnectWallet",
"getAccounts",
"getBlock",
"getClient",
"getConnectedWallets",
"initializeWallets",
"preflight",
"query",
"unstable_getBlockExtrinsics",
]
`));
27 changes: 27 additions & 0 deletions packages/core/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"defineConfig",
"MutationError",
"QueryError",
"ReactiveDotError",
"Query",
"Storage",
"idle",
"pending",
"aggregateWallets",
"connectWallet",
"disconnectWallet",
"getAccounts",
"getBlock",
"unstable_getBlockExtrinsics",
"getClient",
"getConnectedWallets",
"initializeWallets",
"preflight",
"query",
]
`));
11 changes: 11 additions & 0 deletions packages/core/src/internal.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as exports from "./internal.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"flatHead",
"toObservable",
"stringify",
]
`));
9 changes: 9 additions & 0 deletions packages/core/src/maths/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"spendableBalance",
]
`));
9 changes: 9 additions & 0 deletions packages/core/src/providers/light-client/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"createLightClientProvider",
]
`));
15 changes: 15 additions & 0 deletions packages/core/src/wallets/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"WalletProvider",
"DeepLinkWallet",
"initializeWallets",
"InjectedWalletProvider",
"InjectedWallet",
"LocalWallet",
"Wallet",
]
`));
34 changes: 34 additions & 0 deletions packages/react/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"ChainProvider",
"ReactiveDotProvider",
"SignerProvider",
"useAccounts",
"useSpendableBalance",
"useBlock",
"useChainId",
"useChainIds",
"useChainSpecData",
"useClient",
"useConfig",
"useMutationEffect",
"useMutation",
"useNativeTokenAmountFromNumber",
"useNativeTokenAmountFromPlanck",
"useQueryErrorResetter",
"useQueryLoader",
"useQueryRefresher",
"useLazyLoadQuery",
"useLazyLoadQueryWithRefresh",
"useSigner",
"useTypedApi",
"useWalletConnector",
"useWalletDisconnector",
"useConnectedWallets",
"useWallets",
]
`));
10 changes: 10 additions & 0 deletions packages/utils/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"BigIntMath",
"DenominatedNumber",
]
`));
30 changes: 30 additions & 0 deletions packages/vue/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"useAccounts",
"useSpendableBalance",
"useBlock",
"useChainId",
"useChainIds",
"useChainSpecData",
"useClient",
"useConfig",
"useMutation",
"useNativeToken",
"useQueryErrorResetter",
"useQuery",
"useSigner",
"useTypedApi",
"useWalletConnector",
"useWalletDisconnector",
"useConnectedWallets",
"useWallets",
"watchMutationEffect",
"ReactiveDotPlugin",
"provideChain",
"provideSigner",
]
`));
10 changes: 10 additions & 0 deletions packages/wallet-ledger/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"AccountMismatchError",
"LedgerWallet",
]
`));
9 changes: 9 additions & 0 deletions packages/wallet-walletconnect/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as exports from "./index.js";
import { expect, it } from "vitest";

it("should match inline snapshot", () =>
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"WalletConnect",
]
`));

0 comments on commit 3c507dd

Please sign in to comment.