Files
webnet/.env.example
T
codingetandClaude 73a74dcb15 test(tsconnect): add unit and integration test suite
Unit tests cover InMemoryFileOps (read/write/stat/list/rename/remove, seek,
misuse guards, constructor seed) and InMemoryState. No WASM needed.

Integration tests spin up three real Tailscale nodes against a headscale
control server, verifying initIPN WASM loading, /localapi/v0/status, and
two-node TCP dial/listen. Credentials loaded from .env.local (gitignored).

All IPN instances share one Go WASM runtime (factory compiled once); shutdown()
on any one exits the runtime, so a single before()/after() pair wraps the suite.

test:coverage script added for consistency with other packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 20:44:04 +00:00

12 lines
587 B
Bash

# Copy this file to .env.local and fill in real values to enable integration tests.
# .env.local is gitignored and loaded automatically by `npm test` via
# --env-file-if-exists, so integration tests skip gracefully when it is absent.
# URL of the headscale (or Tailscale) control server.
TSCONNECT_TEST_CONTROL_URL=https://headscale.example.com
# Reusable ephemeral authkey for the test tailnet.
# Ephemeral nodes clean themselves up on disconnect, so a single key is enough
# for all tests even when they spin up multiple IPN instances per run.
TSCONNECT_TEST_AUTH_KEY=hskey-auth-...