feat(core):统一 Core 库的命名规范和代码风格 (#207)

This commit is contained in:
YHH
2025-11-01 10:23:46 +08:00
committed by GitHub
parent 6778ccace4
commit 57c7e7be3f
7 changed files with 414 additions and 429 deletions

View File

@@ -27,7 +27,6 @@ describe('Component - 组件基类测试', () => {
let scene: Scene;
beforeEach(() => {
Component._idGenerator = 0;
component = new TestComponent();
scene = new Scene();
entity = scene.createEntity('TestEntity');
@@ -51,12 +50,11 @@ describe('Component - 组件基类测试', () => {
});
test('组件ID应该递增分配', () => {
const startId = Component._idGenerator;
const component1 = new TestComponent();
const component2 = new TestComponent();
expect(component2.id).toBe(component1.id + 1);
expect(component1.id).toBeGreaterThanOrEqual(startId);
expect(component1.id).toBeGreaterThanOrEqual(0);
});
});