eliza
eliza copied to clipboard
Create Example Files Under `packages/_examples/*` with Corresponding Tests Under `/*/_tests` Within Each Type: Adapter, Client, Plugin, etc.
Is your feature request related to a problem? Please describe.
There is currently no clear organization for example implementations and their corresponding tests for constructs like adapters, clients, and plugins. This can lead to confusion, inconsistent patterns, and inefficiencies for developers trying to reference or contribute.
Describe the solution you'd like
Structure the examples and tests as follows:
- Example files go under
packages/_examples/*within their respective construct folders. - Corresponding tests are organized under a
_testssubfolder inside each type directory.
Proposed Structure:
packages/_examples/
├── adapter/
│ ├── exampleAdapter.js
│ └── _tests/
│ └── exampleAdapter.test.js
├── client/
│ ├── exampleClient.js
│ └── _tests/
│ └── exampleClient.test.js
├── plugin/
│ ├── examplePlugin.js
│ └── _tests/
│ └── examplePlugin.test.js
└── README.md // High-level description of examples
Describe alternatives you've considered
- Tests alongside examples: Keeping tests in the same folder creates clutter, especially as examples scale.
- Central
_testsfolder: While centralized tests are clean, separating them under each type folder improves organization and traceability.
Additional context
- This structure creates a clear relationship between example files and their tests.
- Developers can easily locate both the example implementation and corresponding tests for constructs like adapters, clients, and plugins.
- A high-level
README.mdinpackages/_examples/can document the folder's purpose and how to use the examples.