···11+import { expect, test } from 'vitest'
22+import { runVitest } from '../../test-utils'
33+44+test.each(['forks', 'vmForks'] as const)('test case\'s process.send() calls are handled', async (pool) => {
55+ const { stderr } = await runVitest({
66+ root: './fixtures/forks-channel',
77+ pool,
88+ })
99+1010+ expect(stderr).toContain('⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯')
1111+ expect(stderr).toContain('Error: [vitest-pool]: Unexpected call to process.send(). Make sure your test cases are not interfering with process\'s channel.')
1212+})
···11+import { test } from "vitest";
22+33+test("calls IPC channel", () => {
44+ if (!process.send) {
55+ throw new Error("Expected test case to run inside child_process")
66+ }
77+88+ process.send({ "not serialized": "with v8 serializer" })
99+})