A3: derive the pinned command and catalog key lists in tests
Each command module keeps its own COMMAND_IDS next to its commands; the engine listing test checks their union against the registry, so a missing or extra command still fails without one shared list. The menu and palette tests derive their expectation from the listing and check grouping and ordering rules; the catalog's runtime keys are scanned from the sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
da58c83158
commit
95fd9b926f
28 changed files with 329 additions and 262 deletions
|
|
@ -182,6 +182,11 @@ pub fn dispatch(state: &mut State, id: &str, params: Value) -> Option<Outcome> {
|
|||
Some(Outcome::value(Value::Null))
|
||||
}
|
||||
|
||||
/// The ids of the commands this module registers, checked against the
|
||||
/// registry by the engine's listing test. Add a new command's id here.
|
||||
#[cfg(test)]
|
||||
pub(crate) const COMMAND_IDS: &[&str] = &["ui.registerCommands"];
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::valid_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue