@backstage/render-test-app-nav-migration
Migrates tests that use renderInTestApp with nav-item features to renderTestApp, which uses the real Backstage app shell in Backstage v1.51+.
Targets tests that passed features with nav-item extensions and asserted on stub sidebar links. Tests that only mount a component with APIs or route refs are left unchanged.
Installation
bash
Usage (from this repo)
bash
Optional: AI fixup step
Enable with --param aiFixup=true to finish test migrations the AST codemod cannot handle mechanically:
- Remaining
renderInTestAppcalls with nav features - Rewrite sidebar/link assertions for the real app shell
- Preserve needed
mountedRoutes/ API options from the original call - Skip tests that only use
renderInTestAppwithout nav features
Development
From the repo root:
bash
Or from this package directory:
bash