---
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
---

[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

```

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

```

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.