https://github.com/solidos/pane-registry
An index to hold all loaded solid panes, whether statically or dynamically loaded
https://github.com/solidos/pane-registry
running-code
Last synced: 19 days ago
JSON representation
An index to hold all loaded solid panes, whether statically or dynamically loaded
- Host: GitHub
- URL: https://github.com/solidos/pane-registry
- Owner: SolidOS
- License: mit
- Created: 2018-11-17T19:15:47.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-02-28T10:44:58.000Z (12 months ago)
- Last Synced: 2025-04-06T11:11:19.371Z (10 months ago)
- Topics: running-code
- Language: JavaScript
- Homepage:
- Size: 1.42 MB
- Stars: 4
- Watchers: 11
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pane-registry
An index to hold all loaded solid panes, whether statically or dynamically loaded
# Adendum
The pane registry is a crucial part of the Solid Panes system. It is where any pane inserts itself or is inserted. In the standard working of SolidOS, there is one place in solid-panes where all the normal panes are loaded into the pane registry (see: [registerPanes.js](https://github.com/solidos/solid-panes/blob/main/src/registerPanes.js) in solid-panes). But other apps, and especially developers developing new panes can insert their own panes. And so we hope we will end up with panes dynamically laoded according to user configuration preferences.
# Testing Guide
## Running Tests
```bash
# Run all tests
npm test
# Run all tests with coverages
npm test-coverage
# Run tests in watch mode
npm run test-watch
# Run linting only
npm run lint
# Auto-fix linting issues
npm run lint-fix
```
## Test Coverage
The tests provide 100% code coverage for all functionality:
- **Initial State Tests**: Verify registry starts empty
- **Registration Tests**: Test pane registration with various scenarios
- **Lookup Tests**: Test finding panes by name
- **Integration Tests**: Complex workflows and edge cases
## Test Structure
- `test/paneRegistry.test.js` - Main test suite
- Tests use Jest framework with comprehensive mocking
- Console output is mocked to avoid noise during testing
- State is reset between tests for isolation
## Coverage Report
After running tests, view the coverage report:
- Text summary in console
- HTML report in `coverage/` directory