修复响应式查询缓存失效和测试隔离问题
This commit is contained in:
@@ -60,15 +60,15 @@ afterEach(() => {
|
||||
const { Core } = require('../src/Core');
|
||||
const { WorldManager } = require('../src/ECS/WorldManager');
|
||||
|
||||
// 重置 Core 和 WorldManager 单例
|
||||
// 销毁 Core 和 WorldManager 单例
|
||||
if (Core._instance) {
|
||||
Core.reset();
|
||||
Core.destroy();
|
||||
}
|
||||
if (WorldManager._instance) {
|
||||
if (WorldManager._instance.destroy) {
|
||||
WorldManager._instance.destroy();
|
||||
}
|
||||
WorldManager.reset();
|
||||
WorldManager._instance = null;
|
||||
}
|
||||
} catch (error) {
|
||||
// 忽略清理错误
|
||||
|
||||
Reference in New Issue
Block a user