Generic vitest globalSetup factory for cross-backend integration suites.
Pairs with make_cross_backend_project: each cross-backend vitest project
sets its own test.name, and this factory derives the backend name from
that project name (vitest 4 passes the TestProject to globalSetup), picks
the matching BackendConfig, spawns + bootstraps it via bootstrap_backend,
and provides a serializable handle that *.cross.test.ts files
inject and rebuild with reconstruct_bootstrapped_handle.
A consumer's global_setup.ts collapses to:
import {create_cross_backend_global_setup} from
'@fuzdev/fuz_app/testing/cross_backend/create_cross_backend_global_setup.ts';
import {deno_backend_config, rust_backend_config} from './my_backend_config.js';
import './cross_test_types.js';
export default create_cross_backend_global_setup({
configs: {deno: deno_backend_config, rust: rust_backend_config},
});vitest 4's provide hard-rejects non-serializable values, so the live
child / teardown / keeper_transport are stripped via
serialize_bootstrapped_handle; the teardown closure stays in the
globalSetup process and is returned for vitest to fire after the suite.