Skip to content

Commit ab5c9ce

Browse files
committed
test(core): add type for bigDecimal
1 parent 6396343 commit ab5c9ce

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/core/src/submodules/protocols/json/JsonShapeSerializer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe(JsonShapeSerializer.name, () => {
2626
serializer.write(widget, data);
2727
const serialization = serializer.flush();
2828
expect(serialization).toEqual(
29-
`{"blob":"AAAAAQ==","timestamp":0,"bigint":10000000000000000000000054321,"bigdecimal":0.10000000000000000000000054321}`
29+
`{"blob":"AAAAAQ==","timestamp":0,"bigint":10000000000000000000000054321,"bigdecimal":{"string":"0.10000000000000000000000054321","type":"bigDecimal"}}`
3030
);
3131
});
3232
});

packages/core/src/submodules/protocols/json/jsonReplacer.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ describe(JsonReplacer.name, () => {
2424
const serialized = jsonReplacer.replaceInJson(JSON.stringify(data, jsonReplacer.createReplacer(), 2));
2525

2626
expect(serialized).toEqual(`{
27-
"numericValue": 0.1000000000000000000000000000054321
27+
"numericValue": {
28+
"string": "0.1000000000000000000000000000054321",
29+
"type": "bigDecimal"
30+
}
2831
}`);
2932
});
3033

0 commit comments

Comments
 (0)