diff --git a/tests/unit/Deployment/FrameworksTest.php b/tests/unit/Deployment/FrameworksTest.php index 26b0a2fba2..7e370a3687 100644 --- a/tests/unit/Deployment/FrameworksTest.php +++ b/tests/unit/Deployment/FrameworksTest.php @@ -18,11 +18,6 @@ final class FrameworksTest extends TestCase public function testStaticOutputStaysInsideSsrOutput(): void { foreach ($this->frameworks as $key => $framework) { - // Next.js exports a static site to its own root rather than into the ssr build. - if ($key === 'nextjs') { - continue; - } - $ssr = $framework['adapters']['ssr']['outputDirectory'] ?? null; $static = $framework['adapters']['static']['outputDirectory'] ?? null; @@ -30,6 +25,11 @@ final class FrameworksTest extends TestCase continue; } + // An unnested static directory is its own build root, like Next.js ./out. + if (\substr_count(\rtrim($static, '/'), '/') <= 1) { + continue; + } + $this->assertStringStartsWith( \rtrim($ssr, '/') . '/', \rtrim($static, '/') . '/',