# Regenerating Goldenfiles

> Regenerates DTS goldenfiles after d.ts generation logic changes. Use when dts tests fail due to expected output changes, when asked to update goldenfiles, or after modifying the d.ts generator.

- Skill: `golemcloud/regenerating-goldenfiles` (Agent Skill)
- Install (CLI): `npx skillmds@latest add golemcloud/regenerating-goldenfiles`
- Raw SKILL.md: https://api.skillmd.com/api/skills/golemcloud/regenerating-goldenfiles/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: golemcloud (https://skillmd.com/u/golemcloud)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/golemcloud/regenerating-goldenfiles

---


# Regenerating DTS Goldenfiles

The `dts` tests compare generated `.d.ts` output against checked-in golden files in `tests/goldenfiles/`.

## When to Regenerate

When you modify the d.ts generation logic in `crates/wasm-rquickjs/src/` and the `dts` tests fail because the output has intentionally changed.

## Steps

```bash
# 1. Regenerate the golden files
UPDATE_GOLDENFILES=1 cargo test --test dts

# 2. Review the changes
git diff tests/goldenfiles/

# 3. Verify the changes are intentional before committing
```

## Verification

After regenerating, run the tests normally to confirm they pass:

```bash
cargo test --test dts -- --nocapture
```

