Skip to content

🛠 Tooling: This repo's Renovate updates fail unit tests #2198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
JoshuaKGoldberg opened this issue Apr 9, 2025 · 0 comments
Open
3 tasks done

🛠 Tooling: This repo's Renovate updates fail unit tests #2198

JoshuaKGoldberg opened this issue Apr 9, 2025 · 0 comments
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!

Comments

@JoshuaKGoldberg
Copy link
Owner

Tooling Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

This repo is set up with Renovate to automatically update dependencies. The PRs are being created by Renovate just fine, but many deps' versions are set as Vitest snapshots in the Block test files.

For example, #2161 attempts to update prettier-plugin-sh from 0.15.0 to 0.16.0. It unit tests fail in https://github.com/JoshuaKGoldberg/create-typescript-app/actions/runs/14361141505/job/40262699773?pr=2161 with:

 FAIL  src/blocks/blockPrettier.test.ts > blockPrettier > with addons
Error: Snapshot `blockPrettier > with addons 1` mismatched

- Expected
+ Received

@@ -52,11 +52,11 @@
              "husky": "9.1.7",
              "lint-staged": "15.5.0",
              "prettier": "3.5.3",
              "prettier-plugin-curly": "0.3.1",
              "prettier-plugin-packagejson": "2.5.10",
-             "prettier-plugin-sh": "0.15.0",
+             "prettier-plugin-sh": "0.16.0",
            },
            "lint-staged": {
              "*": "prettier --ignore-unknown --write",
            },
            "scripts": {

 ❯ src/blocks/blockPrettier.test.ts:275:20
    273|   });
    274| 
    275|   expect(creation).toMatchInlineSnapshot(`
       |                    ^

Additional Info

I'm not sure the exact best way to solve this. I'd like to keep using .toMatchInlineSnapshot() for tests because it's really convenient. Or, from another perspective, it'd be really inconvenient to have to manually write expected data in tests.

Maybe this repo should have a GitHub Action that manually fixes up package versions in snapshot files? 🤔

🎁

@JoshuaKGoldberg JoshuaKGoldberg added area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! labels Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!
Projects
None yet
Development

No branches or pull requests

1 participant