[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:558](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Worker.ts#L558)

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.