docs: تصحيح أمر E2E — نسخ السكربت بجوار node_modules (ESM لا يقرأ NODE_PATH)

socket.io-client كان يُثبَّت في /tmp لكن السكربت في /s، وESM يبحث عن الحزم
من مجلد السكربت لا cwd. الأمر الصحيح ينسخ السكربت إلى /tmp قبل التشغيل.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hamza-Ayed
2026-07-17 20:50:58 +03:00
co-authored by Claude Opus 4.8
parent 1512bcb5d7
commit 7703c23378
+4 -3
View File
@@ -75,11 +75,12 @@ docker run --rm --network tripz-net -e BASE=http://tripz-api:4010/api \
```
# اختبار شامل متكامل (E2E) — كل وظائف الباك إند من الدخول للتقييم للسحب
# مع WebSocket:
# مع WebSocket: ملاحظة — يجب نسخ السكربت بجوار node_modules، لأن ESM يبحث
# عن الحزم من مجلد السكربت لا من cwd (و NODE_PATH يتجاهله ESM).
docker run --rm --network tripz-net -e BASE=http://tripz-api:4010/api \
-e WS=http://tripz-api:4010 -v /home/tripz-llc/backend/scripts:/s \
node:22-alpine sh -c "cd /tmp && npm i socket.io-client --silent 2>/dev/null; \
NODE_PATH=/tmp/node_modules node /s/e2e-test.mjs"
node:22-alpine sh -c "cd /tmp && npm init -y >/dev/null 2>&1 && \
npm i socket.io-client --silent && cp /s/e2e-test.mjs /tmp/ && node /tmp/e2e-test.mjs"
# أو REST فقط (بلا WebSocket):
docker run --rm --network tripz-net -e BASE=http://tripz-api:4010/api \
-v /home/tripz-llc/backend/scripts:/s node:22-alpine node /s/e2e-test.mjs