Volt.Test.BrowserRunner (Volt v0.22.0)

Copy Markdown View Source

Executes Volt JavaScript and TypeScript tests inside a real browser via PlaywrightEx.

This runner is intentionally small and mirrors Volt.Test.Runner's result contract so ExUnit integration can switch between QuickBEAM and browser execution without changing assertions or reporting.

The browser belongs to the run (see Volt.Test.Browser); each call opens a context in it, loads the file's bundled module and closes the context again.

Summary

Types

result()

@type result() :: map()

Functions

collect_file(path, opts \\ [])

@spec collect_file(
  Path.t(),
  keyword()
) :: {:ok, [map()]} | {:error, term()}

run_file(path, opts \\ [])

@spec run_file(
  Path.t(),
  keyword()
) :: {:ok, result()} | {:error, term()}

run_test(path, test_id, opts \\ [])

@spec run_test(Path.t(), integer(), keyword()) :: {:ok, result()} | {:error, term()}