---
title: Support for ctx.exports in @cloudflare/vitest-pool-workers
description: The Workers Vitest integration now supports the ctx.exports API for accessing your Worker's exports during tests.
image: https://developers.cloudflare.com/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## Support for ctx.exports in @cloudflare/vitest-pool-workers

Dec 16, 2025 

[ Workers ](https://developers.cloudflare.com/workers/) 

The [@cloudflare/vitest-pool-workers](https://developers.cloudflare.com/workers/testing/vitest-integration/) package now supports the [ctx.exports API](https://developers.cloudflare.com/workers/runtime-apis/context/#exports), allowing you to access your Worker's top-level exports during tests.

You can access `ctx.exports` in unit tests by calling `createExecutionContext()`:

**TypeScript**

```ts
import { createExecutionContext } from "cloudflare:test";
import { it, expect } from "vitest";


it("can access ctx.exports", async () => {
  const ctx = createExecutionContext();
  const result = await ctx.exports.MyEntryPoint.myMethod();
  expect(result).toBe("expected value");
});
```

Alternatively, you can import `exports` directly from `cloudflare:workers`:

**TypeScript**

```ts
import { exports } from "cloudflare:workers";
import { it, expect } from "vitest";


it("can access imported exports", async () => {
  const result = await exports.MyEntryPoint.myMethod();
  expect(result).toBe("expected value");
});
```

See the [context-exports fixture ↗](https://github.com/cloudflare/workers-sdk/tree/main/fixtures/vitest-pool-workers-examples/context-exports) for a complete example.

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2025-12-16-vitest-ctx-exports-support/#page","headline":"Support for ctx.exports in @cloudflare/vitest-pool-workers · Changelog","description":"The Workers Vitest integration now supports the ctx.exports API for accessing your Worker's exports during tests.","url":"https://developers.cloudflare.com/changelog/post/2025-12-16-vitest-ctx-exports-support/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog-preview.png","dateModified":"2025-12-16","datePublished":"2025-12-16","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
