Skip to content

update name to match convention#296

Merged
eshaben merged 2 commits into
masterfrom
eshaben/uniswap-name
Jun 8, 2026
Merged

update name to match convention#296
eshaben merged 2 commits into
masterfrom
eshaben/uniswap-name

Conversation

@eshaben

@eshaben eshaben commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Update the name of the test from recipe.test.ts > docs.test.ts

@eshaben eshaben requested a review from nhussein11 as a code owner June 8, 2026 14:41
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Recipe / Docs Test Harness — Contributor Guide

Detected paths in this PR:

  • polkadot-docs/smart-contracts/uniswap-v2-core-hardhat

Architecture Reminder

The cookbook holds test harnesses only — the actual source code for each recipe lives in its own external repository (e.g. brunopgalvao/my-awesome-recipe). A test harness clones that repo at a pinned version, installs, builds, and runs tests.

Expected Scaffolding

Each test harness directory should contain:

recipes/{pathway}/{recipe-name}/
├── package.json          # name, vitest dev-dep, "test": "vitest run"
├── package-lock.json     # committed lock file
├── vitest.config.ts      # vitest configuration
├── tsconfig.json         # TypeScript config
├── tests/
│   └── recipe.test.ts    # clone → install → build → test
└── README.md             # frontmatter: title, description, source_repo

Checklist

  • Source code lives in your own external repo (not in this PR)
  • Test harness clones a pinned version tag (not main/master)
  • package-lock.json is committed
  • README.md has YAML frontmatter (title, description, source_repo)
  • Tests pass locally: npm ci && npm test
  • Commit messages follow Conventional Commits

Useful Links

This is an automated comment and will update when you push new commits.

@brunopgalvao

Copy link
Copy Markdown
Contributor

Thanks for matching the convention here! Before this merges, the rename needs two follow-up edits — right now only the file is moved, but two places still hardcode the old recipe.test.ts name, so the test would silently stop running.

1. vitest.config.ts (line 23) — this is the important one. The include glob points at the old filename, which no longer exists after the rename, so vitest run matches zero test files and the guide stops being tested:

-    include: ["tests/recipe.test.ts"],
+    include: ["tests/docs.test.ts"],

2. .github/workflows/polkadot-docs-uniswap-v2-core-hardhat.yml (line 32) — the npm cache key hashes the old path (now a missing file → degraded caching):

-          key: ${{ runner.os }}-uniswap-v2-core-hardhat-npm-${{ hashFiles('polkadot-docs/smart-contracts/uniswap-v2-core-hardhat/tests/recipe.test.ts') }}
+          key: ${{ runner.os }}-uniswap-v2-core-hardhat-npm-${{ hashFiles('polkadot-docs/smart-contracts/uniswap-v2-core-hardhat/tests/docs.test.ts') }}

For reference, the sibling uniswap-v2-periphery-hardhat already has both of these pointing at tests/docs.test.ts — that's the end state to match.

(The two recipe.test.ts mentions in pr-recipe-guidance.yml are just a stale comment + doc-template string — the detection logic keys off the tests/ dir, not the filename — so those are cosmetic and can be left out of scope.)

@eshaben eshaben requested a review from brunopgalvao as a code owner June 8, 2026 14:46

@brunopgalvao brunopgalvao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both follow-up spots now point at tests/docs.test.ts and match the uniswap-v2-periphery-hardhat sibling:

  • vitest.config.tsinclude: ["tests/docs.test.ts"]
  • polkadot-docs-uniswap-v2-core-hardhat.yml cache key → hashFiles(.../tests/docs.test.ts)

Rename is complete and the harness will run as expected. LGTM 👍

@eshaben eshaben merged commit f19584b into master Jun 8, 2026
7 checks passed
@eshaben eshaben deleted the eshaben/uniswap-name branch June 8, 2026 14:48
@github-actions github-actions Bot mentioned this pull request Jun 15, 2026
3 tasks
@github-actions github-actions Bot mentioned this pull request Jun 29, 2026
3 tasks
@brunopgalvao brunopgalvao mentioned this pull request Jun 29, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants