test(longbridge-tools): skip account-fixture tests when fixtures are absent - #10
Merged
Merged
Conversation
This was referenced Sep 8, 2026
Collaborator
Author
|
补充一个可以加速合并的事实:这条现在是新门禁(#12,已合并进 main)的解锁项。 证据:
由于这些 fixture 按约定不入库,任何全新环境(CI、外部贡献者的机器)目前跑 Unit tests 都必然为红。 |
4 tasks
…ures are absent positions/assets/cash-flow/portfolio fixtures are captured from a real authenticated account and deliberately gitignored, so a fresh clone (and CI) failed 7 tests. Skip them when the fixture files are missing; maintainers who regenerate fixtures via capture.sh keep full coverage.
kbkb628
force-pushed
the
test/skip-missing-account-fixtures
branch
from
September 11, 2026 05:24
d30deb1 to
73e04fb
Compare
This was referenced Sep 11, 2026
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.
问题
全新 clone(及 CI 的
release.yml工作流)上bun test有 7 个失败,根因:positions、assets、cash-flow、portfolio四个 fixture 是从真实已认证账户抓取的,按 .gitignore 约定永不提交(用capture.sh手动再生成),但 7 个测试无条件依赖它们。改动
这 7 个测试改为在对应 fixture 文件不存在时跳过(
it.skipIf(!existsSync(fixturePath(...))))。本地重新抓取过 fixture 的维护者仍会跑满全部覆盖,干净环境则保持全绿。验证
bun test --isolate→ 1160 通过 / 7 跳过 / 0 失败bun run typecheck全绿