mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-07 08:09:13 +08:00
* Binary serialization * Update snapshots * Update * rename option ccon -> useCCON * Missing script * encodeCCONJson: chunks -> chunkURLs * Update * (de)serializeSymbol -> (de)serializeTag; * CustomizedSerializable -> CustomSerializable * _deserializePrimitiveObject -> _fillPlainObject * Unify CCClass CCClassConstructor * encodeCCONJson -> parseCCONJson * Custom serializable * Move (de)serializeSuper(This) from context into global * property -> read(write)Property; (de)serializeThis(Super) -> (read)writeThis(Super) * CI and lint * Mock cc env
29 lines
703 B
TypeScript
29 lines
703 B
TypeScript
import { PORTS_BOTH_DYNAMIC_COMPILED, testEachPort } from "../port";
|
|
import { runTest } from "../utils";
|
|
|
|
const value = Object.assign(Object.create(null), {
|
|
foo: 'a',
|
|
|
|
bar: Object.assign(Object.create(null), {
|
|
baz: 2,
|
|
|
|
__baz: 3,
|
|
}),
|
|
|
|
__foo: 'b',
|
|
});
|
|
|
|
testEachPort(PORTS_BOTH_DYNAMIC_COMPILED, async (port) => {
|
|
await runTest(
|
|
__filename,
|
|
port,
|
|
value,
|
|
(serialized) => {
|
|
expect(serialized).toHaveProperty('foo', 'a');
|
|
expect(serialized).not.toHaveProperty('__foo');
|
|
expect(serialized).toHaveProperty('bar.baz', 2);
|
|
expect(serialized).not.toHaveProperty('bar.__baz');
|
|
},
|
|
);
|
|
});
|