test: add Vitest + Testing Library unit tests for running-apps feature
Set up Vitest (jsdom environment) and @testing-library/react. api.test.ts — fetchRunningApps: - returns parsed JSON on 2xx - returns [] on non-ok HTTP status - returns [] on network error (non-throwing contract) KnobCard.test.tsx — app_volume: - datalist is rendered with all supplied runningApps as options - no datalist / list attr when runningApps is empty or omitted - onChange called with the new value on input change KnobCard.test.tsx — group_volume: - app-picker select rendered with runningApps options - no picker when runningApps is empty or omitted - Add button disabled until an app is selected - Add button enabled after selection - clicking Add appends app to targets - clicking Add skips duplicates (onChange not called) - picker resets to placeholder after a successful Add
This commit is contained in:
7 files changed
+1589
-4
No files matched your search
Generated
+1347
-1
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user