@arizeai/phoenix-client/jest exposes the same API as the Vitest
entrypoint but binds to Jest’s globals (describe, test, it,
beforeAll, afterAll).
Setup
Create a separatephoenix.jest.config.cjs:
testMatchkeeps eval suites separate from regular tests.reporterskeeps Jest’s default reporter and adds the Phoenix summary block at the end of the run.setupFiles: ["dotenv/config"]loadsPHOENIX_HOST,PHOENIX_API_KEY, and other env vars from.env.testTimeoutis bumped because LLM calls can be slow.
The
jsdom test environment is not supported. Either omit
testEnvironment or set it to "node". For TypeScript or ESM use
ts-jest / @swc/jest per Jest’s docs.package.json:
API
describe,describe.only,describe.skiptest,test.only,test.skip,test.eachit(alias fortest)logOutput,logAnnotation,evaluate
Notes
- This module reads Jest globals off
globalThisat suite-declaration time, so importing it outside of a Jest test run will throw with a helpful error message. - Jest’s
--bailflag will short-circuit the experiment; the Phoenix reporter still prints a summary for the suites that ran.
Source Map
src/jest/index.tssrc/jest/reporter.tssrc/testing/runner.ts

