Volt.Test.ExUnit (Volt v0.15.2)

Copy Markdown View Source

Registers Volt JavaScript and TypeScript test files as ordinary ExUnit tests.

Add it to test/test_helper.exs after ExUnit.start/1:

ExUnit.start(exclude: [:integration])
Volt.Test.ExUnit.install()

Configuration is read from config :volt, :test and supports the same profile-style overrides as the rest of Volt:

config :volt, :test,
  root: "assets",
  include: ["**/*.{test,spec}.{js,ts,jsx,tsx}"]

This keeps mix test as the single test entry point. JavaScript and TypeScript files are represented as generated ExUnit modules and participate in normal ExUnit tags, formatters, failures, and CI behavior.

Pass browser: true to execute tests in a real Playwright browser instead of QuickBEAM while keeping the same ExUnit registration model.

Summary

Functions

install(opts \\ [])

@spec install(keyword()) :: [module()]