Skip to content

Commit 4641213

Browse files
committed
chore(task): archive 05-08-fix-rclone-empty-vitest-suite
1 parent 3911093 commit 4641213

4 files changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
2+
{"file": ".trellis/spec/guides/code-reuse-thinking-guide.md", "reason": "检查测试 API 是否复用 Vitest 模式"}
3+
{"file": ".trellis/spec/guides/index.md", "reason": "共享检查指南"}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
2+
{"file": ".trellis/spec/guides/index.md", "reason": "共享开发思考指南"}
3+
{"file": ".trellis/spec/guides/code-reuse-thinking-guide.md", "reason": "修复测试导入前复用既有 Vitest 模式"}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# fix: 修复 rclone vitest 空测试套件
2+
3+
## Goal
4+
5+
修复 GitHub Actions Ubuntu 环境下根 Vitest 扫描 `config/service/oss/rclone/rclone-ops.test.mjs` 时报告 `No test suite found` 的问题,让该文件里的测试能被 Vitest 正确注册和执行。
6+
7+
## What I already know
8+
9+
* CI 报错文件是 `config/service/oss/rclone/rclone-ops.test.mjs`
10+
* 该文件命名符合 Vitest 默认测试发现模式 `*.test.mjs`
11+
* 文件当前从 `node:test` 导入 `describe` / `it`,而根 GitHub Action 使用 `pnpm exec vitest run` 执行。
12+
* Vitest 官方文档说明可用 `include` / `exclude` 控制测试发现;本问题更适合修复测试 API 导入,而不是隐藏该测试文件。
13+
14+
## Requirements
15+
16+
* `rclone-ops.test.mjs` 必须使用 Vitest 注册测试套件。
17+
* 保留现有断言逻辑和覆盖范围。
18+
* 不修改业务脚本行为。
19+
20+
## Acceptance Criteria
21+
22+
* [x] `pnpm exec vitest run config/service/oss/rclone/rclone-ops.test.mjs` 通过。
23+
* [x] 根目录 `pnpm qa` 通过,或明确说明无法执行的原因。
24+
25+
## Technical Notes
26+
27+
* Context7 Vitest docs: 测试文件发现可通过 `include` / `exclude` 配置,但当前文件确实是测试文件,应使用 Vitest API。
28+
* `rclone-ops.mjs` 保留 shebang 与可执行位;通过 `.gitattributes` 固定该脚本 LF,避免 Windows checkout 后 Vitest/Vite 导入 CRLF shebang 文件时报语法错误。
29+
* 相关文件:`config/service/oss/rclone/rclone-ops.test.mjs`
30+
31+
## Verification
32+
33+
* `node --check config/service/oss/rclone/rclone-ops.mjs` 通过。
34+
* `node --check config/service/oss/rclone/rclone-ops.test.mjs` 通过。
35+
* `pnpm exec vitest run config/service/oss/rclone/rclone-ops.test.mjs --reporter=verbose --no-color` 通过,8 个测试全部通过。
36+
* `pnpm qa` 通过;当前 Windows 环境按项目脚本跳过 Linux-only QA。
37+
38+
## Out of Scope
39+
40+
* 不调整 GitHub Actions workflow。
41+
* 不重构 rclone 运维脚本。
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"id": "fix-rclone-empty-vitest-suite",
3+
"name": "fix-rclone-empty-vitest-suite",
4+
"title": "fix: 修复 rclone vitest 空测试套件",
5+
"description": "",
6+
"status": "completed",
7+
"dev_type": null,
8+
"scope": null,
9+
"package": "bash-scripts",
10+
"priority": "P2",
11+
"creator": "mudssky",
12+
"assignee": "mudssky",
13+
"createdAt": "2026-05-08",
14+
"completedAt": "2026-05-08",
15+
"branch": null,
16+
"base_branch": "master",
17+
"worktree_path": null,
18+
"commit": null,
19+
"pr_url": null,
20+
"subtasks": [],
21+
"children": [],
22+
"parent": null,
23+
"relatedFiles": [],
24+
"notes": "",
25+
"meta": {}
26+
}

0 commit comments

Comments
 (0)