[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Worker](https://evolu.dev/docs/api-reference/common/Worker) › testCreateMessageChannel

```ts
function testCreateMessageChannel<Input, Output>(): TestMessageChannel<
  Input,
  Output
>;
```

Defined in: [packages/common/src/Worker.ts:376](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Worker.ts#L376)

Creates an in-memory [MessageChannel](https://evolu.dev/docs/api-reference/common/Worker/interfaces/MessageChannel) for testing.

Messages are queued until `onMessage` is assigned, matching the browser
MessagePort behavior where the port message queue starts disabled.

Both ports are registered in the native port registry so
[testCreateMessagePort](https://evolu.dev/docs/api-reference/common/Worker/variables/testCreateMessagePort) can look them up by their native token.