Skip to content

Modernize CI/CD, testing, and tooling for the 2026 JavaScript ecosystem #607

@oberstet

Description

@oberstet

Context

With AutobahnJS 26.3.1 released and a full-stack demo proven (Vue 3.6 + Pinia 3 + Vite 8 + Crossbar.io + Playwright), the next step is to bring CI/CD, testing, and developer tooling up to the same standard — all fully automated in GitHub Actions.

A working end-to-end integration test exists in a private customer repo. This issue brings equivalent public OSS integration testing into autobahn-js itself, alongside expanded unit tests and modern Rust-based tooling.

Related


1. Vitest unit tests: expand coverage

Current state: Vitest is configured, basic tests exist from #604.

Goal: Comprehensive unit test coverage for core AutobahnJS functionality:

  • Connection lifecycle (open, close, reconnect)
  • Session management (join, leave, authentication handshake)
  • RPC: call, register, unregister, error handling, timeout
  • PubSub: subscribe, unsubscribe, publish, event dispatch
  • Serializer selection (JSON, with mocked msgpack/cbor)
  • Auth modules: anonymous, WAMP-CRA, WAMP-cryptosign
  • Deferred/Promise factory (ES6 path, after Modernization part II / 26.4.1 #606 removes when.js)
  • Transport layer: WebSocket connect/disconnect/error

Run locally via just test and automatically in GitHub Actions on every push/PR.

2. Playwright integration tests — public OSS, fully automated CI/CD integrated into GH Actions

Goal: End-to-end browser tests in this repo that prove AutobahnJS works in a real browser against a real Crossbar.io router. This is a public, open-source integration test — not a downstream customer concern.

What to test (Playwright, headless Chromium):

  • Anonymous WAMP connection (WebSocket + JSON)
  • WAMP-cryptosign authentication (Ed25519, tweetnacl)
  • RPC: call + register, error handling, authorization denial
  • PubSub: subscribe + publish, event delivery
  • Framework compatibility: Vite 8 + Rolldown build, Vue 3.6 (Vapor Mode), Pinia 3

Implementation:

  • Add a self-contained integration test app in the repo (e.g. tests/integration/) with Vue 3.6, Pinia 3, Vite 8, and a Crossbar.io config
  • Playwright test suite covering all scenarios above
  • just test-e2e recipe: builds app, starts Crossbar.io (Docker), runs Playwright, cleans up
  • GitHub Actions job: Crossbar.io as a Docker service, Playwright with cached Chromium, runs on every push/PR

3. Use Vite+ as the unified toolchain driver

Vite+ by VoidZero is the unified toolchain that bundles Vite, Vitest, Rolldown, and oxc into a single coherent package.

Vite+ is built to scale with your codebase while reducing your devtools to a single dependency. By leveraging VoidZero’s Rust-based JavaScript tooling, every interaction with the toolchain becomes significantly faster and scales better

It is still "alpha", but seems pretty well built by pros who know what they are doing. It's Rust;) We adopt it now. Move fast.

  • Replace separate vite + vitest dependencies with vite-plus
  • Use Vite+ for building the integration test app
  • Use Vite+ for running Vitest unit tests
  • Update justfile recipes and CI to use vite-plus CLI
  • Document Vite+ usage in README

4. Lint and format with Oxlint + Oxfmt

Replace ESLint + Prettier with Rust-based tooling from the oxc project — faster, stricter, and part of the same VoidZero ecosystem as Rolldown.

  • Replace ESLint with Oxlint
  • Replace Prettier with Oxfmt
  • Update just lint and just format recipes
  • Add lint + format checks to GitHub Actions (every push/PR, fail on violations)
  • Remove ESLint/Prettier dependencies from devDependencies

Justfile recipes (target state)

just test          # Vitest unit tests
just test-e2e      # Playwright integration tests (starts Crossbar, runs tests, cleans up)
just test-all      # Both
just lint          # Oxlint
just format        # Oxfmt
just ci            # lint + format-check + test-all (what GH Actions runs)

GitHub Actions CI matrix (target state)

All jobs run automatically on every push and pull request.

Job What Tools
Lint + format Code quality checks, fail on violations Oxlint, Oxfmt
Unit tests Vitest across Node.js 22, 24, 25 Vite+, Vitest
Integration tests Playwright + Crossbar.io Docker + Vue 3.6 + Pinia 3 Vite+, Playwright, Chromium
Publish dry-run npm pack --dry-run on release tags npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions