원클릭으로
unit-test-quality-checks
// Unit test validation rules for Scopy plugin IIOWidget tests. Auto-loads when reviewing or writing `*_Unit_test.js` files.
// Unit test validation rules for Scopy plugin IIOWidget tests. Auto-loads when reviewing or writing `*_Unit_test.js` files.
Guidelines for using Context7, web search, and other research tools to find solutions outside the Scopy codebase. Loaded when the task involves unfamiliar technology or external libraries.
Core Scopy architecture knowledge including plugin lifecycle, library dependencies, build system, and key design patterns. Loaded by clarify-task and design-task commands.
How Scopy libraries depend on each other, plugin commonalities, MessageBroker topics, shared widgets, style system flow, and build system relationships. Loaded when determining component interactions or change impact.
Decision trees for common Scopy architectural choices - plugin vs core, tool vs section, widget type selection, sync vs async, GNU Radio vs direct, package organization, and API exposure. Loaded when making design decisions.
Catalog of all Scopy development tools including package generator, testing tools, CI scripts, format/license scripts, and dev plugin commands. Loaded when analyzing what tools exist for a task.
Code patterns and examples for Scopy IIOWidget unit tests. Covers standard helpers, data-driven testing, and complex multi-step scenarios. Auto-loads when creating or reviewing `*_Unit_test.js` files.
| name | unit-test-quality-checks |
| description | Unit test validation rules for Scopy plugin IIOWidget tests. Auto-loads when reviewing or writing `*_Unit_test.js` files. |
Apply these 7 validation categories when reviewing or generating JS unit test scripts for Scopy plugins.
getWidgetKeys() returnQ_INVOKABLE getter/setter pairs from the plugin's *_api.hreadWidget(), writeWidget(), testRange(), testCombo(), testCheckbox(), testReadOnly(), testConversion(), and runDataDrivenTests() calls)Q_INVOKABLE getter/setter pair with no test exercising ittestRange()testCombo()testCheckbox()testReadOnly()testConversion()testBadValueRange(), testBadValueCombo()runDataDrivenTests()writeWidget(), set*(), or any state-mutating API call (e.g., calibrate(), dpdReset(), refresh(), loadProfile()) must be followed immediately by msleep(500) on the next non-empty linemsleep(1000) or longer is acceptable (minimum is msleep(500))testRange() call SHOULD also have a testBadValueRange() calltestCombo() call SHOULD also have a testBadValueCombo() call// SECTION: Complex Functionality Tests)// C1: Full Calibration Flow)UNIT.<SECTION>.<DESCRIPTIVE_NAME> format<plugin>_Basic_Unit_test.js — basic/main tool widget tests<plugin>_Advanced_Unit_test.js — advanced tab widget tests<plugin>_Complex_Unit_test.js — multi-step functionality tests<plugin>_Unit_test.js — combined runner (or single file if only one)TestFramework.disconnectFromDevice()TestFramework.printSummary()scopy.exit()evaluateFile() to include sub-files and must NOT duplicate helper functions or test cases