fix: remove orphaned test files that can never sync from scaffold-stark-2 - #20
Merged
Conversation
…rk-2 Deletes 25 test files under packages/nextjs (__tests__/__test__ dirs) that have been frozen at their 2025-04-22 state and cannot be updated or removed by any future sync from scaffold-stark-2.
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.
Root cause
sync-basecamp-repo.yamlin scaffold-stark-2 rsyncs into this repo with--exclude='__test*__', added on 2025-05-05 in scaffold-stark-2 commit985489f(PR #528). In rsync,--excludeboth prevents new copies and protects the existing destination copy from--delete. As a result, the 25 test files underpackages/nextjsin this repo froze at whatever state they were in as of the last sync before that exclude was added (2025-04-22), and no future sync — no matter what changes upstream — can ever update or remove them.Later, scaffold-stark-2 commit
6df4565(2026-03-13) migrated@starknet-react/core→@starknet-start/react, changingpackage.jsonand every test file that imported the old package together, in the same commit. This repo received thepackage.jsonhalf of that change via sync (it now depends on@starknet-start/react^1.0.8) but could never receive the test-file half, because the exclude rule was already blocking/protecting those paths. The frozen test files still doimport { useConnect } from "@starknet-react/core"— a package that exists in neither repo anymore.This is why
Check typings on Next.jshas failed on every one of the last 40 CI runs on this branch:tschitsTS2307: Cannot find module '@starknet-react/core'(plus a few unrelated type-signature drifts) across 9 of these frozen test files.The fix
PR #528's intent was clearly that this repo should not carry scaffold-stark-2's unit tests going forward — it stopped future copies, but it never cleaned up the 25 files that were already here before the rule took effect. This PR deletes those files. Once removed, the exclude rule correctly keeps them out permanently, since rsync has no source path left to (not) copy from.
Deleted directories (25 files total):
packages/nextjs/hooks/scaffold-stark/__tests__/(14 test files + 1 inseed/)packages/nextjs/utils/scaffold-stark/__test__/(6 files)packages/nextjs/app/debug/_components/contract/__test__/(2 test files + 1 inmock/)packages/nextjs/services/web3/__test__/(1 file)No dependency, config, or other source file was changed — this is a deletion-only cleanup.
Risk checked before opening this PR: would deleting all tests break the test-runner step?
Confirmed empirically that it does not:
packages/nextjs/package.json'stestscript is already"vitest run --passWithNoTests"— the--passWithNoTestsflag pre-dates this PR, so vitest exits 0 with "No test files found" rather than failing.packages/nextjs(excludingnode_modules) for any*.test.ts(x)/*.spec.ts(x)files outside the four deleted directories — there are none, so this is not a partial cleanup that leaves a mismatched suite behind.Verification (run locally against this branch)
yarn install— succeeds (exit 0), before and after the deletion.yarn check-types(the currently-failing "Check typings on Next.js" step) — before: fails with 25error TS...across 9 files, all inside the deleted directories. after: exits 0, zero errors.yarn test— exits 0:No test files found, exiting with code 0(via pre-existing--passWithNoTests).yarn lint— exits 0:No ESLint warnings or errors.git rm -ron 4 directories, 25 files):packages/nextjs/app/debug/_components/contract/__test__/mock/mockABI.tspackages/nextjs/app/debug/_components/contract/__test__/utilsContract.test.tsxpackages/nextjs/app/debug/_components/contract/__test__/utilsDisplay.test.tsxpackages/nextjs/hooks/scaffold-stark/__tests__/ContractClassHashCache.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/seed/mockDeployedContractData.tspackages/nextjs/hooks/scaffold-stark/__tests__/useAutoConnect.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useDataTransaction.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useDeployedContractInfo.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useNativeCurrencyPrice.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useOutsideClick.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useScaffoldContract.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useScaffoldEventHistory.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useScaffoldMultiWriteContract.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useScaffoldReadContract.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useScaffoldStarkProfile.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useScaffoldWriteContract.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useTargetNetwork.test.tspackages/nextjs/hooks/scaffold-stark/__tests__/useTransactor.test.tspackages/nextjs/services/web3/__test__/PriceService.test.tspackages/nextjs/utils/scaffold-stark/__test__/common.test.tspackages/nextjs/utils/scaffold-stark/__test__/contract.test.tspackages/nextjs/utils/scaffold-stark/__test__/eventKeyFilter.test.tspackages/nextjs/utils/scaffold-stark/__test__/eventsData.test.tspackages/nextjs/utils/scaffold-stark/__test__/mockDeployedContractAbi.tspackages/nextjs/utils/scaffold-stark/__test__/types.test.tsThis PR is deletion-only and touches nothing else. Not merging — leaving for a basecamp reviewer/maintainer to review and merge.