commit db9d0a64a5263a6e1f31f2c5f7dfddcd3ff6bce5
parent 43a9aa2f44c2e4308079e6f06ffa2c8d817ad146
Author: triesap <tyson@radroots.org>
Date: Thu, 11 Jun 2026 06:26:55 -0700
test(sdk): add binding import smoke
Diffstat:
5 files changed, 101 insertions(+), 0 deletions(-)
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
@@ -41,6 +41,30 @@ importers:
packages/types-bindings: {}
+ tests/import-smoke:
+ dependencies:
+ '@radroots/core-bindings':
+ specifier: workspace:*
+ version: link:../../packages/core-bindings
+ '@radroots/events-bindings':
+ specifier: workspace:*
+ version: link:../../packages/events-bindings
+ '@radroots/events-indexed-bindings':
+ specifier: workspace:*
+ version: link:../../packages/events-indexed-bindings
+ '@radroots/identity-bindings':
+ specifier: workspace:*
+ version: link:../../packages/identity-bindings
+ '@radroots/replica-db-schema-bindings':
+ specifier: workspace:*
+ version: link:../../packages/replica-db-schema-bindings
+ '@radroots/trade-bindings':
+ specifier: workspace:*
+ version: link:../../packages/trade-bindings
+ '@radroots/types-bindings':
+ specifier: workspace:*
+ version: link:../../packages/types-bindings
+
packages:
typescript@5.9.3:
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
@@ -1,2 +1,3 @@
packages:
- "packages/*"
+ - "tests/*"
diff --git a/tests/import-smoke/package.json b/tests/import-smoke/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@radroots/sdk-import-smoke",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "build": "tsc -p tsconfig.json",
+ "typecheck": "tsc -p tsconfig.json --noEmit"
+ },
+ "dependencies": {
+ "@radroots/core-bindings": "workspace:*",
+ "@radroots/events-bindings": "workspace:*",
+ "@radroots/events-indexed-bindings": "workspace:*",
+ "@radroots/identity-bindings": "workspace:*",
+ "@radroots/replica-db-schema-bindings": "workspace:*",
+ "@radroots/trade-bindings": "workspace:*",
+ "@radroots/types-bindings": "workspace:*"
+ }
+}
diff --git a/tests/import-smoke/src/index.ts b/tests/import-smoke/src/index.ts
@@ -0,0 +1,48 @@
+import {
+ KIND_LISTING,
+ RADROOTS_LISTING_PRODUCT_TAG_KEYS,
+} from "@radroots/events-bindings";
+import { RADROOTS_USERNAME_MIN_LEN } from "@radroots/identity-bindings";
+import type { RadrootsCoreMoney } from "@radroots/core-bindings";
+import type {
+ RadrootsEventsIndexedManifest,
+ RadrootsEventsIndexedShardId,
+} from "@radroots/events-indexed-bindings";
+import type { RadrootsListing } from "@radroots/events-bindings";
+import type { Farm } from "@radroots/replica-db-schema-bindings";
+import type { RadrootsTradeListingTotal } from "@radroots/trade-bindings";
+import type { IError } from "@radroots/types-bindings";
+
+const amount: RadrootsCoreMoney = {
+ amount: "1.00",
+ currency: "USD",
+};
+
+const shardId: RadrootsEventsIndexedShardId = "us-1";
+
+const manifest: RadrootsEventsIndexedManifest = {
+ country: "US",
+ total: 0,
+ shard_size: 1000,
+ first_published_at: 0,
+ last_published_at: 0,
+ shards: [],
+};
+
+const farm = undefined as unknown as Farm;
+const listing = undefined as unknown as RadrootsListing;
+const total = undefined as unknown as RadrootsTradeListingTotal;
+const error = undefined as unknown as IError<string>;
+
+export const smoke = {
+ amount,
+ error,
+ farm,
+ kind: KIND_LISTING,
+ listing,
+ manifest,
+ productKeys: RADROOTS_LISTING_PRODUCT_TAG_KEYS,
+ shardId,
+ total,
+ usernameMinLen: RADROOTS_USERNAME_MIN_LEN,
+};
diff --git a/tests/import-smoke/tsconfig.json b/tests/import-smoke/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "dist",
+ "rootDir": "src"
+ },
+ "include": [
+ "src/**/*.ts"
+ ]
+}