Skip to content

chore(translations): replace vitest with backstage-cli package test command and moved some files for this#2417

Open
christoph-jerolimov wants to merge 3 commits intoredhat-developer:mainfrom
christoph-jerolimov:translations/remove-vitest
Open

chore(translations): replace vitest with backstage-cli package test command and moved some files for this#2417
christoph-jerolimov wants to merge 3 commits intoredhat-developer:mainfrom
christoph-jerolimov:translations/remove-vitest

Conversation

@christoph-jerolimov
Copy link
Member

@christoph-jerolimov christoph-jerolimov commented Mar 2, 2026

Hey, I just made a Pull Request!

  1. replace vitest with backstage-cli package test command
  2. For this I moved the test files from test to src/tests. Then I moved the rest of these files in test into doc or scripts.
  3. Added skip on a broken test which was already broken in vitest !

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

…ommand and moved some files for this

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
@rhdh-qodo-merge
Copy link

Review Summary by Qodo

Replace vitest with backstage-cli package test and reorganize test files

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Replace vitest with backstage-cli package test command
• Move test files from test/ to src/tests/ directory
• Relocate test scripts to scripts/ directory
• Remove vitest configuration and dependencies
• Update documentation to reflect testing changes
Diagram
flowchart LR
  A["vitest test runner"] -->|"Replace with"| B["backstage-cli package test"]
  C["test/ directory"] -->|"Move to"| D["src/tests/ and scripts/"]
  E["vitest.config.ts"] -->|"Remove"| F["No config needed"]
  G["vitest dependency"] -->|"Remove"| H["Use backstage-cli"]
Loading

Grey Divider

File Changes

1. workspaces/translations/packages/cli/src/tests/generate.test.ts ✨ Enhancement +1/-2

Remove vitest imports and unused helper

workspaces/translations/packages/cli/src/tests/generate.test.ts


2. workspaces/translations/packages/cli/vitest.config.ts ⚙️ Configuration changes +0/-29

Delete vitest configuration file

workspaces/translations/packages/cli/vitest.config.ts


3. workspaces/translations/.changeset/quick-mangos-teach.md 📝 Documentation +5/-0

Add changeset for vitest replacement

workspaces/translations/.changeset/quick-mangos-teach.md


View more (13)
4. workspaces/translations/packages/cli/docs/TESTING-GUIDE.md 📝 Documentation +15/-7

Update testing guide with new structure

workspaces/translations/packages/cli/docs/TESTING-GUIDE.md


5. workspaces/translations/packages/cli/docs/TESTS.md 📝 Documentation +1/-3

Remove vitest references from docs

workspaces/translations/packages/cli/docs/TESTS.md


6. workspaces/translations/packages/cli/knip-report.md 📝 Documentation +0/-6

Remove vitest coverage dependency report

workspaces/translations/packages/cli/knip-report.md


7. workspaces/translations/packages/cli/package.json Dependencies +8/-11

Update test scripts and remove vitest dependency

workspaces/translations/packages/cli/package.json


8. workspaces/translations/packages/cli/docs/TESTING.md Additional files +0/-0

...

workspaces/translations/packages/cli/docs/TESTING.md


9. workspaces/translations/packages/cli/docs/WORKFLOW_VERIFICATION.md Additional files +0/-0

...

workspaces/translations/packages/cli/docs/WORKFLOW_VERIFICATION.md


10. workspaces/translations/packages/cli/docs/manual-test-checklist.md Additional files +0/-0

...

workspaces/translations/packages/cli/docs/manual-test-checklist.md


11. workspaces/translations/packages/cli/scripts/compare-reference-files.sh Additional files +0/-0

...

workspaces/translations/packages/cli/scripts/compare-reference-files.sh


12. workspaces/translations/packages/cli/scripts/integration-test.sh Additional files +0/-0

...

workspaces/translations/packages/cli/scripts/integration-test.sh


13. workspaces/translations/packages/cli/scripts/quick-test.sh Additional files +0/-0

...

workspaces/translations/packages/cli/scripts/quick-test.sh


14. workspaces/translations/packages/cli/scripts/real-repo-test.sh Additional files +0/-0

...

workspaces/translations/packages/cli/scripts/real-repo-test.sh


15. workspaces/translations/packages/cli/scripts/workflow-verification.ts Additional files +0/-0

...

workspaces/translations/packages/cli/scripts/workflow-verification.ts


16. workspaces/translations/packages/cli/src/tests/test-helpers.ts Additional files +0/-0

...

workspaces/translations/packages/cli/src/tests/test-helpers.ts


Grey Divider

Qodo Logo

@rhdh-qodo-merge
Copy link

rhdh-qodo-merge bot commented Mar 2, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Stale testing paths🐞 Bug ⛯ Reliability
Description
TESTING-GUIDE.md still points to the old test/ directory (manual checklist, chmod commands, and
described file layout) even though the PR moved files into docs/ and scripts/. Following the
guide will fail or mislead contributors.
Code

workspaces/translations/packages/cli/docs/TESTING-GUIDE.md[R25-28]

+## Manual testing checklist
+
+See: test/manual-test-checklist.md
+
Evidence
The guide still references test/manual-test-checklist.md and test/*.sh, but the package scripts
now reference docs/manual-test-checklist.md and ./scripts/*.sh, so the documented paths are
incorrect.

workspaces/translations/packages/cli/docs/TESTING-GUIDE.md[25-28]
workspaces/translations/packages/cli/docs/TESTING-GUIDE.md[160-216]
workspaces/translations/packages/cli/package.json[19-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docs/TESTING-GUIDE.md` still references the old `test/` directory (manual checklist path, chmod commands, and an outdated directory tree) even though the PR moved those assets to `docs/` and `scripts/`.
## Issue Context
`package.json` now runs test utilities from `./scripts/*` and points manual testing to `docs/manual-test-checklist.md`.
## Fix Focus Areas
- workspaces/translations/packages/cli/docs/TESTING-GUIDE.md[20-40]
- workspaces/translations/packages/cli/docs/TESTING-GUIDE.md[156-217]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Removed script in docs🐞 Bug ✓ Correctness
Description
docs/TESTING.md instructs users to run npm run test:local, but the PR removed the test:local
script from package.json. Users following the doc will hit a missing-script error.
Code

workspaces/translations/packages/cli/package.json[L32-33]

-    "dev:help": "ts-node src/index.ts --help",
-    "test:local": "npm run build && node bin/translations-cli"
+    "dev:help": "ts-node src/index.ts --help"
Evidence
The documentation explicitly tells users to run npm run test:local, but the current package.json
scripts section no longer defines it, so the documented command cannot work.

workspaces/translations/packages/cli/docs/TESTING.md[64-75]
workspaces/translations/packages/cli/package.json[19-32]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docs/TESTING.md` references `npm run test:local`, but `test:local` was removed from `package.json` in this PR.
## Issue Context
The supported execution paths now appear to be `yarn build` + `node bin/translations-cli ...` (or `yarn dev`), plus the scripts under `scripts/`.
## Fix Focus Areas
- workspaces/translations/packages/cli/docs/TESTING.md[52-90]
- workspaces/translations/packages/cli/package.json[19-32]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Mar 2, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/translations-cli workspaces/translations/packages/cli patch v0.0.1

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

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.

1 participant