@@ -6,6 +6,10 @@ import { __testing } from "../../scripts/e2e/npm-telegram-live-runner.ts";
66
77const TEST_DIR = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
88const DOCKER_SCRIPT_PATH = path . resolve ( TEST_DIR , "../../scripts/e2e/npm-telegram-live-docker.sh" ) ;
9+ const PREPARE_PACKAGE_PATH = path . resolve (
10+ TEST_DIR ,
11+ "../../scripts/e2e/lib/npm-telegram-live/prepare-package.mjs" ,
12+ ) ;
913
1014describe ( "package Telegram live Docker E2E" , ( ) => {
1115 it ( "supports npm-specific Convex credential aliases" , ( ) => {
@@ -61,6 +65,7 @@ describe("package Telegram live Docker E2E", () => {
6165
6266 it ( "keeps private QA harness imports local while using the installed package dist" , ( ) => {
6367 const script = readFileSync ( DOCKER_SCRIPT_PATH , "utf8" ) ;
68+ const preparePackage = readFileSync ( PREPARE_PACKAGE_PATH , "utf8" ) ;
6469 const gatewayRpcClient = readFileSync (
6570 path . resolve ( TEST_DIR , "../../extensions/qa-lab/src/gateway-rpc-client.ts" ) ,
6671 "utf8" ,
@@ -73,9 +78,10 @@ describe("package Telegram live Docker E2E", () => {
7378 expect ( script ) . toContain ( 'ln -sfnT "$openclaw_package_dir/dist" /app/dist' ) ;
7479 expect ( script ) . toContain ( 'cp "$openclaw_package_dir/package.json" /app/package.json' ) ;
7580 expect ( script ) . toContain ( 'ln -sfnT /app/extensions "$openclaw_package_dir/extensions"' ) ;
76- expect ( script ) . toContain ( '"/app/node_modules/openclaw/package.json"' ) ;
77- expect ( script ) . toContain ( 'pkg.exports["./plugin-sdk/gateway-runtime"]' ) ;
78- expect ( script ) . toContain ( '"./dist/plugin-sdk/gateway-runtime.js"' ) ;
81+ expect ( script ) . toContain ( "node scripts/e2e/lib/npm-telegram-live/prepare-package.mjs" ) ;
82+ expect ( script ) . toContain ( "/app/node_modules/openclaw/package.json" ) ;
83+ expect ( preparePackage ) . toContain ( 'pkg.exports["./plugin-sdk/gateway-runtime"]' ) ;
84+ expect ( preparePackage ) . toContain ( '"./dist/plugin-sdk/gateway-runtime.js"' ) ;
7985 expect ( gatewayRpcClient ) . toContain ( 'from "openclaw/plugin-sdk/gateway-runtime"' ) ;
8086 expect ( qaRuntimeApi ) . toContain ( 'from "openclaw/plugin-sdk/gateway-runtime"' ) ;
8187 } ) ;
0 commit comments