---
id: TASK-2.3
title: Add tests for `profiles` command
status: Done
assignee:
  - codex
created_date: '2026-01-29 18:16'
updated_date: '2026-01-29 18:28'
labels: []
dependencies: []
references:
  - spec/zync_spec.lua
  - spec/api_spec/commands_spec.lua
  - spec/api_spec/manager_spec.lua
  - spec/fixtures/configurator_fix.lua
parent_task_id: TASK-2
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Add Busted tests that validate the new `profiles` command output for configured and non-configured projects, including command availability and ordering behavior.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Tests cover `profiles` command when profiles are configured (deterministic order)
- [x] #2 Tests cover `profiles` command when profiles are not configured (profile-less message)
- [x] #3 Tests validate command registration (`profiles`/`p`) in the commands module
- [x] #4 Test updates are consistent with existing test patterns and pass with `busted`
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
1) Add command registration assertions for `profiles`/`p` in `spec/api_spec/commands_spec.lua`.
2) Add manager-level tests for `profiles` output in `spec/api_spec/manager_spec.lua` (configured order + profile‑less message).
3) Add an integration-style check in `spec/zync_spec.lua` if needed to ensure command dispatch for `profiles` works.
4) Run `busted` and update task notes/acceptance criteria.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added `profiles` command registration coverage in `spec/api_spec/commands_spec.lua`.

Added manager tests for configured profiles order and profile-less message in `spec/api_spec/manager_spec.lua`.

Ran `busted` (all 47 specs passing).
<!-- SECTION:NOTES:END -->
