mirror of
https://github.com/unraid/api.git
synced 2026-05-07 23:51:40 -05:00
feat: createDockerFolder & setDockerFolderChildren mutations (#1558)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added the ability to create Docker folders and set folder children via new GraphQL mutations in the Docker organizer. * Enhanced organizer management with pure functions for folder creation and child assignment, ensuring immutability. * **Bug Fixes** * Improved validation to prevent empty or invalid folder entries in the organizer structure. * **Tests** * Added comprehensive tests for folder creation, child assignment, and organizer resolution, including edge cases and immutability checks. * Updated test guidelines to focus on observable behavior and error handling best practices. * **Documentation** * Expanded testing best practices in project documentation. * **Chores** * Updated ignore rules for local configuration files. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -4,6 +4,10 @@ globs: **/*.test.ts,**/__test__/components/**/*.ts,**/__test__/store/**/*.ts,**/
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
## General Testing Best Practices
|
||||
- **Error Testing:** Use `.rejects.toThrow()` without arguments to test that functions throw errors. Don't test exact error message strings unless the message format is specifically what you're testing
|
||||
- **Focus on Behavior:** Test what the code does, not implementation details like exact error message wording
|
||||
|
||||
## Vue Component Testing Best Practices
|
||||
- This is a Nuxt.js app but we are testing with vitest outside of the Nuxt environment
|
||||
- Nuxt is currently set to auto import so some vue files may need compute or ref imported
|
||||
|
||||
Reference in New Issue
Block a user