Skip to content

Commit 141addf

Browse files
authored
fix: add extra instructions for the pr review agent to make sure the code being tested is not mocked out (#62)
* fix: add extra instructions for the pr review agent to make sure the code being tested is not mocked out + add another instruction about not just testing type definitions
1 parent 0c1d748 commit 141addf

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/reusable-node-ci.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,17 @@ jobs:
7373
pr_reviewer.inline_code_comments: "true"
7474
pr_description.publish_description_as_comment: "false"
7575
pr_description.add_original_user_description: "true"
76-
# pr_reviewer.extra_instructions: "- instruction a\n- instruction b\n..."
77-
76+
pr_reviewer.extra_instructions: |
77+
## Reviewer Instructions
78+
### General
79+
- In general if there is a PR that requires updating any versions of `@shardeum` packages, ensure those changes are in an separate PR (or in the same PR in its own commit). Otherwise, merging between branch lines (which have different versions) is much more difficult.
80+
### Unit Tests
81+
- Ensure that external API calls or side effects are mocked out, not the function under test
82+
- Each test should import the actual function being tested
83+
- Mock only external dependencies, never the function itself
84+
- Make sure tests cover real functionality, not only type definitions
85+
- `expect()` syntax should be used instead of `assert()`
86+
- If a test is using mocks, ensure its cleaned up after the test
7887
merge-checks:
7988
name: QA merge checks
8089
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)