Trim cross-file redundancies in the strict-resolver tests#21332
Closed
NullVoxPopuli-ai-agent wants to merge 1 commit intoemberjs:nvp/strict-resolver-rfc-1132from
Closed
Conversation
After the basic-test.js cleanup, three cross-file overlaps remain.
None change coverage — each dropped case is already asserted by
another test.
registry_test.ts:
- `resolves shorthand modules (without default wrapper)` is already
covered by basic-test's three shorthand-edge-case tests, and the
Application integration is already proven by `resolves modules
provided via modules property` just above it.
- `resolves router:main via ./router module` just re-checks the
mainLookup path that basic-test covers via `\`type:main\` resolves
to the unpluralized \`type\` module key`; router:main is
registered by Ember itself, not by the strict resolver.
strict-resolver-test.ts:
- `gjs component resolves from modules` and `sub-route with nested
model` both visit `/posts` and inspect `[data-test=post-card]`.
Folded the h2-exists assertion into the count test and dropped
the standalone gjs test.
strict-resolver-substates-test.ts:
- `visiting /posts renders the list` and `visiting a nested dynamic
sub-route renders the detail template` repeat what
strict-resolver-test.ts already checks; the substates scenario
should focus on loading/error state behaviour.
- Removed the now-unused posts/show scaffolding (router entry,
routes/posts.js, routes/posts/show.js, templates/posts.hbs,
templates/posts/show.hbs) to keep the scenario app minimal.
Net: −85 lines across three files, no loss of coverage. All three
strict-resolver smoke scenarios still pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After the last trim of
basic-test.js, three cross-file overlaps remain across the four resolver test files:registry_test.tsresolves shorthand modules (without default wrapper)resolves modules provided via modules property(proves Application integration)registry_test.tsresolves router:main via ./router module\type:main` resolves to the unpluralized `type` module key` (router:main is registered by Ember itself, not strict-resolver specific)strict-resolver-test.tsgjs component resolves from modulessub-route with nested model— both visit/postsand inspect[data-test=post-card]; folded the h2 check instrict-resolver-substates-test.tsvisiting /posts renders the listsub-route with nested modelin strict-resolver-test.tsstrict-resolver-substates-test.tsvisiting a nested dynamic sub-route renders the detail templatedynamic segment sub-routein strict-resolver-test.tsRemoving those two substates tests also lets us drop the now-unused scaffolding (router entry, routes/posts.js, routes/posts/show.js, templates/posts.hbs, templates/posts/show.hbs) — the substates scenario should focus on loading/error state behavior, which is what strict-resolver-substates-test is named for.
Result
registry_test.ts: 4 tests → 2 tests, −34 linesstrict-resolver-test.ts: folded 2 tests into 1, −10 linesstrict-resolver-substates-test.ts: 5 tests → 3 tests + removed dead scaffolding, −41 linesNet: −85 lines, identical coverage.
Test plan
pnpm test --filter strictpasses all three scenarios (strictResolver-basics,strictResolver-strict-resolver,strictResolver-strict-resolver-substates)pnpm type-check:internals,pnpm lint:eslint,pnpm prettier --checkall clean🤖 Generated with Claude Code