R018: testcase重复
OfficialPrevent duplicate testcases within a describe block.
Software Engineering#unit tests#static analysis#test quality#duplicate detection#rule enforcement#arkts#ts-javascript
Authoropenharmonyinsight
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you eliminate ambiguous or conflicting testcases by detecting duplicate testcase names inside the same describe block, so test runs can uniquely identify each case.
Core Features & Use Cases
- Detects duplicate testcase names: Finds repeated it() testcase names and @tc.name values within the same describe block only.
- Correct scope handling: Does not compare across different files or across different describe blocks.
- Actionable remediation: Keeps the first occurrence unchanged and recommends appending an Adapt{三位数字} suffix to later duplicates, updating @tc.name accordingly.
Quick Start
Use this rule to scan a specific .test.ets/.test.ts/.test.js file and get a report listing duplicate testcase names with the first offending line and all duplicate line numbers.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: R018: testcase重复 Download link: https://github.com/openharmonyinsight/openharmony-skills/archive/main.zip#r018-testcase Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.