mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 22:49:26 -06:00
This commit restores the original throwing behavior of fromGoldenLayoutConfig() and removes the unnecessary design inconsistency introduced earlier. Key changes: - Restored fromGoldenLayoutConfig() to throw on invalid input (original behavior) - Enhanced isValidItemConfig() with proper type validation (string componentName, object componentState) - Removed redundant double validation from findConfig() - try/catch was already correct - Updated history widget to use proper try/catch for error handling - Fixed all test expectations to match throwing behavior - Improved validation to reject invalid types instead of being overly lenient The implementation now provides robust validation while maintaining the expected API contract that the function throws on invalid input. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Front-end unit tests
Tests here are super simple and use jsdom with a fake document to do quick checks on the front-end code.
For anything requiring a real browser, use the cypress tests in the cypress directory.