inertia start

v0.15.0

v0.15.0

This release moves JavaScript unit tests from Node's native test runner to Vitest, so frontend tests run through Vite's module resolution and can import application code that uses the default Laravel @ alias.

Highlights

  • JavaScript unit tests now run with Vitest.
  • Tests can import frontend modules that use Vite aliases such as @/lib/... without a custom Node loader.

Added

  • Added Vitest as a development dependency.

Changed

  • npm run test now runs vitest run tests/**/*.test.mjs instead of node --test tests/**/*.test.mjs.
  • Existing JavaScript unit tests now import test and afterEach from vitest instead of node:test.

Upgrade Guide

  1. Run npm install.
  2. If you have custom JavaScript tests that import lifecycle or test helpers from node:test, update those imports to vitest. For example, replace import test from 'node:test' with import { test } from 'vitest', and replace import { afterEach, test } from 'node:test' with import { afterEach, test } from 'vitest'.
  3. Keep using npm run test as before.