Repository navigation
chore(internals): specify mock import type argument - #576
Open
cursor[bot] wants to merge 1 commit into
Open
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Replaces the unnecessary type assertion on importOriginal in the packages service tests with an explicit type argument. The assertion had no runtime effect. Repository suppressions for @typescript-eslint/no-unnecessary-type-assertion go from 193 to 192. Co-authored-by: Cory Rylan <coryrylan@users.noreply.github.com> Signed-off-by: Cursor Agent <cursoragent@cursor.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This branch has not been deployed
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.
Lint mode B. The selector chose
@typescript-eslint/no-unnecessary-type-assertioninprojects/internals/tools/src/packages/service.test.ts.The mock asserted
importOriginal()asRecord<string, unknown>. ESLint reported that the generic call can take that type argument directly, so the test now callsimportOriginal<Record<string, unknown>>(). The assertion had no runtime effect.Repository suppressions for this rule: 193 → 192. The tools suppressions file: 17 → 16, and the
src/packages/service.test.tsentry is gone.No public API changed.
Left alone: the other assertions in this file (
ToolMethod<unknown>, changelog string and record unions, andas Error). They still change the expression type. The mock staysRecord<string, unknown>because the fixture only supplies two package versions.Validation: tools lint passed.
test:coveragepassed 745 tests, including the 12 in this file.test:types,test:axe,test:ssr,test:lighthouse, andtest:visualare not defined.pnpm run teststill fails the pre-existingsetup-agent.test.tsEACCESonmkdir '/project/.agents/skills/elements'when Vitest isolation is off; package CI usestest:coverage. RootCI=true pnpm run cipassed (5 ran, 192 skipped).