refactor(core): 统一参数命名 - worldId/sceneId 改为 worldName/sceneName (#225)
* refactor(core): 统一参数命名 - worldId/sceneId 改为 worldName/sceneName * test(core): 更新测试用例以匹配新的错误消息 * refactor(core): 提高代码覆盖率 - 添加参数验证和测试
This commit is contained in:
@@ -198,6 +198,14 @@ describe('DebugPlugin', () => {
|
||||
const results = debugPlugin.queryEntities({ tag: 999 });
|
||||
expect(results.length).toBe(0);
|
||||
});
|
||||
|
||||
it('应该能够按 sceneName 过滤实体', () => {
|
||||
// 查询特定场景的实体
|
||||
const results = debugPlugin.queryEntities({ sceneName: 'test-scene' });
|
||||
|
||||
// 应该返回 test-scene 中的所有实体(Player, Enemy, Item)
|
||||
expect(results.length).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
describe('监控功能', () => {
|
||||
|
||||
Reference in New Issue
Block a user