emaadali/pest-neondb-plugin

Pest plugin for isolating Laravel parallel tests with Neon database branches.
19
Install
composer require emaadali/pest-neondb-plugin
Latest Version:v0.1.30
PHP:^8.3
License:MIT
Last Updated:Jun 17, 2026
Links: GitHub  ·  Packagist
Maintainer: parallel-oss

Pest NeonDB Plugin

Laravel-focused Pest plugin for isolating parallel test workers with Neon database branches.

Installation

composer require --dev emaadali/pest-neondb-plugin

Usage

In tests/Pest.php:

use function Emaadali\PestNeondbPlugin\usesNeonTestingRootBranch;

usesNeonTestingRootBranch();

Configure your test environment:

NEON_TEST_BRANCHES=true
NEON_API_KEY=...
NEON_PROJECT_ID=...
NEON_PARENT_BRANCH_ID=...
NEON_TEST_BRANCH_TTL_SECONDS=21600

The root test branch is created once per Pest run and deleted when the parent test process exits. Laravel parallel workers automatically create expiring child branches from that root branch and point the worker database connection at the child branch.