修复序列化ci测试

This commit is contained in:
YHH
2025-10-08 20:58:07 +08:00
parent 610232e6b0
commit 072e68cf43

View File

@@ -83,8 +83,14 @@ class NonSerializableComponent extends Component {
describe('ECS Serialization System', () => { describe('ECS Serialization System', () => {
beforeEach(() => { beforeEach(() => {
// @ECSComponent装饰器会自动注册组件到ComponentRegistry无需手动注册 // 清空测试环境
ComponentRegistry.reset(); // 清空测试环境 ComponentRegistry.reset();
// 重新注册测试组件因为reset会清空所有注册
ComponentRegistry.register(PositionComponent);
ComponentRegistry.register(VelocityComponent);
ComponentRegistry.register(PlayerComponent);
ComponentRegistry.register(HealthComponent);
}); });
describe('Component Serialization', () => { describe('Component Serialization', () => {