fix(core): 移除fflate依赖,修复TextEncoder兼容性问题 (#217)
* fix(core): 移除fflate依赖,修复TextEncoder兼容性问题 * fix(core): 移除fflate依赖,修复TextEncoder兼容性问题
This commit is contained in:
@@ -559,15 +559,7 @@ describe('ECS Serialization System', () => {
|
||||
|
||||
// 验证是Uint8Array类型
|
||||
expect(binaryData instanceof Uint8Array).toBe(true);
|
||||
|
||||
// JSON序列化对比
|
||||
const jsonData = scene1.serialize({ format: 'json', pretty: false });
|
||||
|
||||
// 二进制应该更小
|
||||
const binarySize = (binaryData as Uint8Array).length;
|
||||
const jsonSize = (jsonData as string).length;
|
||||
console.log(`Binary size: ${binarySize} bytes, JSON size: ${jsonSize} bytes`);
|
||||
expect(binarySize).toBeLessThan(jsonSize);
|
||||
expect((binaryData as Uint8Array).length).toBeGreaterThan(0);
|
||||
|
||||
// 新场景反序列化二进制数据
|
||||
const scene2 = new Scene({ name: 'LoadTest' });
|
||||
|
||||
Reference in New Issue
Block a user