Skip to content

Commit da70fda

Browse files
committed
feat: migrated the smoke-test to typescript (#105)
1 parent 2c971fd commit da70fda

4 files changed

Lines changed: 127 additions & 76 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"docker:build": "docker build -t nostream .",
5151
"pretest:integration": "mkdir -p .test-reports/integration",
5252
"test:load": "node -r ts-node/register ./scripts/security-load-test.ts",
53-
"smoke:nip03": "node scripts/smoke-nip03.mjs",
53+
"smoke:nip03": "node -r ts-node/register scripts/smoke-nip03.ts",
5454
"test:integration": "cucumber-js",
5555
"cover:integration": "nyc --report-dir .coverage/integration npm run test:integration -- -p cover",
5656
"export": "node --env-file-if-exists=.env -r ts-node/register src/scripts/export-events.ts",

scripts/smoke-nip03.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ would use.
2525
## Prerequisites
2626

2727
- A running nostream relay (default `ws://127.0.0.1:8008`).
28-
- Node.js >= 18 (for built-in `WebSocket`).
28+
- Node.js (same as the repo; the script runs via `ts-node` and uses the `ws` package).
2929
- [`opentimestamps-client`](https://github.com/opentimestamps/opentimestamps-client)
3030
for the real `ots` step (optional; the script auto-detects and skips
3131
gracefully if it's not installed):
@@ -51,7 +51,7 @@ would use.
5151
```bash
5252
npm run smoke:nip03
5353
# or, with non-default relays:
54-
node scripts/smoke-nip03.mjs \
54+
npx ts-node scripts/smoke-nip03.ts \
5555
--local-relay ws://127.0.0.1:8008 \
5656
--source-relay wss://nostr-pub.wellorder.net
5757
```

0 commit comments

Comments
 (0)