querysystem进行ci测试隔离

This commit is contained in:
YHH
2025-07-29 10:39:48 +08:00
parent 9450dd5869
commit 4a9317f3f4

View File

@@ -405,6 +405,7 @@ describe('QuerySystem - 查询系统测试', () => {
describe('查询统计和性能监控', () => {
test('应该能够获取查询统计信息', () => {
querySystem.clearCache(); // 确保测试隔离
entities[0].addComponent(new PositionComponent(10, 20));
entities[1].addComponent(new VelocityComponent(1, 1));
@@ -460,6 +461,7 @@ describe('QuerySystem - 查询系统测试', () => {
describe('内存管理和优化', () => {
test('大量查询不应该导致内存泄漏', () => {
querySystem.clearCache(); // 确保测试隔离
const entityCount = 1000;
const testEntities: Entity[] = [];