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 testnow runsvitest run tests/**/*.test.mjsinstead ofnode --test tests/**/*.test.mjs.- Existing JavaScript unit tests now import
testandafterEachfromvitestinstead ofnode:test.
Upgrade Guide
- Run
npm install. - If you have custom JavaScript tests that import lifecycle or test helpers from
node:test, update those imports tovitest. For example, replaceimport test from 'node:test'withimport { test } from 'vitest', and replaceimport { afterEach, test } from 'node:test'withimport { afterEach, test } from 'vitest'. - Keep using
npm run testas before.