Commit Graph

2 Commits

Author SHA1 Message Date
Sebastian "Sebbie" Silbermann 33af645bea [test] Convert the prerender-native-module suite to local fixture packages (#97542)
This suite installed `sqlite` and `sqlite3` on every run to prerender a
page from a checked-in SQLite database. Neither package was needed for
what the test covers. The pinned `sqlite3@5.0.2` has no linux-arm64
prebuild, and every job that runs this suite is linux-arm64, so each one
compiled the SQLite amalgamation from source. That pin is also Node-API
based and therefore context-aware, so it could no longer reproduce the
abort the suite was originally added for.

The fixture now uses its own compiled `native-addon` plus a
dependency-free JS wrapper standing in for `sqlite`'s role, and reads
its rows from a plain JSON file. The `path.join(process.cwd(), ...)`
expression stays in the page, because output file tracing only follows
it from the app's own code, so moving it into the wrapper would stop the
data file being traced.

The emitted traces were read rather than assumed. Turbopack and
`@vercel/nft` produce the same fixture entries, including the compiled
binary at `native-addon/build/Release/native_addon.node` and the
`process.cwd()`-derived `users.json`.

The trace assertion now checks each pattern separately instead of
collapsing them into a single `every(...)`, which could only report that
something did not match. The `notTests` block went away with it, since
`[].some(...)` asserted nothing.
2026-08-20 11:57:04 +02:00
JJ Kasper 8e52126ea6 Migrate prerender tests to new set-up (#29245) 2021-09-21 16:21:05 +02:00