Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/golden/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ pnpm dlx tsx anthropic.ts
pnpm dlx tsx openai.ts
```

### Vitest Golden Tests

```bash
cd vitest
pnpm install --ignore-workspace
export BRAINTRUST_API_KEY=<your-key> # Required to send spans to Braintrust
export OPENAI_API_KEY=<your-key> # Required for OpenAI tests
pnpm test
```

This will run the Vitest wrapper golden tests which validate that the `wrapVitest` integration correctly traces test execution to Braintrust. Tests include both basic logging and OpenAI API calls to verify wrapper composition.

### Python Tests

```bash
Expand Down
17 changes: 17 additions & 0 deletions internal/golden/vitest-v2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "golden-vitest-v2",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"test": "vitest run --config vitest.config.js"
},
"dependencies": {
"@ai-sdk/openai": "^3.0.0-beta.44",
"ai": "6.0.1",
"braintrust": "file:../../../js"
},
"devDependencies": {
"vitest": "^2.1.9"
}
}
Loading
Loading