Path: blob/main/lang/bun/files/patch-test_integration_next-pages_test_dev-server-ssr-100.test.ts
46591 views
-- Skip gracefully when bun:internal-for-testing is unavailable (release builds).1-- bun:internal-for-testing is only compiled into debug/development builds of bun.2-- FreeBSD ports always build a release binary, so this module is never available.3-- Without this patch, the test file crashes at module load time with ENOENT,4-- causing "Unhandled error between tests" in the bun test output.5--- test/integration/next-pages/test/dev-server-ssr-100.test.ts.orig2026-04-27 17:51:47 UTC6+++ test/integration/next-pages/test/dev-server-ssr-100.test.ts7@@ -1,12 +1,24 @@8import { Subprocess } from "bun";9-import { install_test_helpers } from "bun:internal-for-testing";10-import { afterAll, beforeAll, expect, test } from "bun:test";11+// bun:internal-for-testing is only available in debug builds; skip gracefully in release builds.12+let install_test_helpers: any;13+try {14+ ({ install_test_helpers } = require("bun:internal-for-testing") as any);15+} catch {16+ install_test_helpers = null;17+}18+import { afterAll, beforeAll, describe, expect, test } from "bun:test";19import { copyFileSync } from "fs";20import { cp, rm } from "fs/promises";21import PQueue from "p-queue";22import { join } from "path";23import { StringDecoder } from "string_decoder";24import { bunEnv, bunExe, tmpdirSync, toMatchNodeModulesAt } from "../../../harness";25+26+if (!install_test_helpers) {27+ describe.skip("next-pages dev server (bun:internal-for-testing unavailable in release builds)", () => {28+ test("skipped", () => {});29+ });30+} else {31const { parseLockfile } = install_test_helpers;3233expect.extend({ toMatchNodeModulesAt });34@@ -172,3 +184,4 @@35},36timeout,37);38+}394041