You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the litegraph-specific CodeRabbit review rules into docs/testing/litegraph-testing.md, link the guide from docs/testing/README.md, and keep .coderabbit.yaml as a path-to-docs bridge.
Verification: parsed .coderabbit.yaml with Ruby YAML and ran git diff --check.
Copy file name to clipboardExpand all lines: .coderabbit.yaml
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -70,12 +70,7 @@ reviews:
70
70
Treat `.agents/checks/test-quality.md`, `docs/testing/README.md`, and `docs/guidance/vitest.md` as required review context for every changed Vitest test file.
71
71
- path: 'src/lib/litegraph/**/*.test.ts'
72
72
instructions: |
73
-
Treat `.agents/checks/test-quality.md`, `docs/testing/README.md`, and `docs/guidance/vitest.md` as required review context for every changed litegraph Vitest test file.
74
-
Reuse shared factories in `src/utils/__tests__/litegraphTestUtils.ts` instead of hand-rolling litegraph node, canvas, graph, subgraph, or workflow builders.
75
-
Flag mocked litegraph classes when a real instance or shared factory would exercise behavior directly.
76
-
When a PR changes litegraph graph deserialization, link loading, nullable serialized links, or sparse legacy link handling, require direct regression coverage for the changed runtime path. Helper-only coverage in a different utility is insufficient.
77
-
For `LGraph.configure()` sparse legacy links, expect a test that constructs an `LGraph`, calls `configure()` with a v0.4 payload containing `links: [null, validLink]`, asserts it does not throw, and asserts the valid link is still created.
78
-
For link-retargeting or widget-slot compression changes such as `compressWidgetInputSlots()`, expect a direct test of the compression path with `links: [null, validLink]` that proves the valid link is still retargeted while the null entry is ignored.
73
+
Treat `.agents/checks/test-quality.md`, `docs/testing/README.md`, `docs/guidance/vitest.md`, and `docs/testing/litegraph-testing.md` as required review context for every changed litegraph Vitest test file.
Treat `.agents/checks/test-quality.md`, `docs/testing/README.md`, and `docs/guidance/playwright.md` as required review context for every changed Playwright test file.
This guide covers test patterns for LiteGraph graph, node, link, subgraph, and workflow behavior in ComfyUI Frontend.
4
+
5
+
## Shared Factories
6
+
7
+
Reuse shared factories in `src/utils/__tests__/litegraphTestUtils.ts` instead of hand-rolling LiteGraph node, canvas, graph, subgraph, or workflow builders.
8
+
9
+
Use real LiteGraph instances or shared factories when they exercise behavior directly. Avoid mocking LiteGraph classes unless the test is intentionally checking a seam outside LiteGraph itself.
10
+
11
+
## Runtime Path Coverage
12
+
13
+
When a PR changes LiteGraph graph deserialization, link loading, nullable serialized links, or sparse legacy link handling, add direct regression coverage for the changed runtime path. Helper-only coverage in a different utility is not enough when the changed branch is reached through the runtime path.
14
+
15
+
For `LGraph.configure()` sparse legacy links, construct an `LGraph`, call `configure()` with a v0.4 payload containing `links: [null, validLink]`, assert that it does not throw, and assert that the valid link is still created.
16
+
17
+
For link retargeting or widget-slot compression changes such as `compressWidgetInputSlots()`, test the compression path directly with `links: [null, validLink]`. The test should prove that the valid link is still retargeted while the null entry is ignored.
0 commit comments