From 7f83b3bb0e0be04917add510a294fa39318fda11 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 25 Sep 2026 14:37:01 +0200 Subject: [PATCH] test: run the plugin's test files one after another The CI run on main at 7ba0dc5 failed every test in plugin.test.ts with "Unexpected end of JSON input" from createPluginRuntimeTestHost. The test host's config builds the plugin into this package's dist/ once per test file and reads dist/manifest.json back; one local run started 22 builds, seven of them at the same moment. A file whose read lands in the middle of another file's write gets an empty manifest and fails as a whole. The parallel builds also load the runner, which is where the earlier timeouts came from. Files now run sequentially: 88 s instead of 38 s locally, and no concurrent builds. The cause is in @emdash-cms/plugin-test and unchanged on upstream/main. --- packages/analytics/vitest.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/analytics/vitest.config.ts b/packages/analytics/vitest.config.ts index 3342336..3f43bfb 100644 --- a/packages/analytics/vitest.config.ts +++ b/packages/analytics/vitest.config.ts @@ -10,5 +10,11 @@ export default defineConfig({ // plugin-test suite. testTimeout: 30_000, hookTimeout: 30_000, + // plugin-test 0.2 builds the plugin into this package's dist/ once + // per test file and reads dist/manifest.json back. Files run in + // parallel rewrite that file while others read it, and a reader that + // gets it half-written fails the whole file with "Unexpected end of + // JSON input". + fileParallelism: false, }, });