MCPcopy Create free account
hub / github.com/apache/fory / testTypeInfo

Function testTypeInfo

javascript/test/fory.test.ts:87–94  ·  view source on GitHub ↗
(typeinfo: TypeInfo, input: any, expected?: any)

Source from the content-addressed store, hash-verified

85 })
86
87 function testTypeInfo(typeinfo: TypeInfo, input: any, expected?: any) {
88 const fory = new Fory({ compatible: false });
89 const serialize = fory.register(typeinfo);
90 const result = serialize.deserialize(
91 serialize.serialize(input)
92 );
93 expect(result).toEqual(expected ?? input)
94 }
95});

Callers 1

fory.test.tsFile · 0.85

Calls 3

registerMethod · 0.95
deserializeMethod · 0.65
serializeMethod · 0.65

Tested by

no test coverage detected