Fix ffi database return big int

This commit is contained in:
2024-05-31 11:37:51 +08:00
parent c85672070c
commit 15ff42d8c4
10 changed files with 43 additions and 15 deletions

View File

@@ -12,6 +12,7 @@ import {
PromiseStatus,
sleep,
sure_dir,
toJSON,
} from "./utils.ts";
import { md5 } from "lifegpc-md5";
@@ -158,3 +159,11 @@ Deno.test("map_test", () => {
}, d);
assertEquals(re, [3, 4]);
});
Deno.test("toJSON_test", () => {
assertEquals(toJSON({ a: 3n }), '{"a":3}');
assertEquals(
toJSON([1099511627776n, { a: 45n }]),
'[1099511627776,{"a":45}]',
);
});