mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-07 00:02:53 +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
14 lines
249 B
TypeScript
14 lines
249 B
TypeScript
|
|
const ccEnv = require('internal:constants');
|
|
|
|
export function mockEnv (name: string, value: any) {
|
|
const original = ccEnv[name];
|
|
ccEnv[name] = value;
|
|
return {
|
|
restore() {
|
|
ccEnv[name] = original;
|
|
},
|
|
};
|
|
}
|
|
|