Skip to content

Commit ab9f90f

Browse files
committed
refactor: enhance test runner to exclude core plugins and log exclusions
1 parent bdf0763 commit ab9f90f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/cli/src/utils/test-runner.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,22 @@ export class TestRunner {
6565

6666
if (testingPlugin && projectAgent?.plugins) {
6767
// Find the plugin that's not a core plugin (like sql or bootstrap)
68+
// Core plugins are excluded because they provide infrastructure, not testable features
6869
const corePlugins = ['@elizaos/plugin-sql', '@elizaos/plugin-bootstrap', 'bootstrap'];
70+
const excludedPlugins = projectAgent.plugins.filter((plugin) =>
71+
corePlugins.includes(plugin.name)
72+
);
6973
const nonCorePlugins = projectAgent.plugins.filter(
7074
(plugin) => !corePlugins.includes(plugin.name)
7175
);
7276

77+
// Log which plugins are being excluded and why
78+
if (excludedPlugins.length > 0) {
79+
safeLogger.debug(
80+
`Excluding ${excludedPlugins.length} core plugin(s) from test scope: ${excludedPlugins.map((p) => p.name).join(', ')} (these provide infrastructure, not testable features)`
81+
);
82+
}
83+
7384
if (nonCorePlugins.length > 0) {
7485
// Store the actual plugin being tested
7586
this.pluginUnderTest = nonCorePlugins[0];
@@ -79,6 +90,9 @@ export class TestRunner {
7990
);
8091
} else {
8192
this.isDirectPluginTest = false;
93+
safeLogger.debug(
94+
'No non-core plugins found to test - all loaded plugins are infrastructure plugins'
95+
);
8296
}
8397
} else if (
8498
projectAgent?.plugins?.length === 1 &&

0 commit comments

Comments
 (0)