UNPKG
@juici/math
Version:
latest (0.1.0)
0.1.0
A mathematics utility library
Juici/math.js
@juici/math
/
src
/
__tests__
/
BigDecimal
/
toJSON.test.ts
7 lines
(5 loc)
•
206 B
text/typescript
View Raw
1
2
3
4
5
6
7
import
{
BigDecimal
}
from
"../../BigDecimal"
;
test
(
"toJSON"
,
() =>
{
expect
(
new
BigDecimal
(
"1.2345"
).
toJSON
()).
toBe
(
"1.2345"
);
expect
(
JSON
.
stringify
(
new
BigDecimal
(
"0.00123"
))).
toBe
(
`"0.00123"`
); });