fix(core): update

This commit is contained in:
2024-02-25 01:43:07 +01:00
parent cece00a9b0
commit 0227f22ca6
7 changed files with 1271 additions and 1474 deletions

View File

@ -59,4 +59,14 @@ tap.test('stringify should handle plain string', async () => {
expect(smartjson.parse(stringifiedString)).toEqual('hello');
});
tap.test('should work with buffers', async () => {
const someObject = {
myBuffer: Buffer.from('hello'),
};
const stringified = smartjson.stringify(someObject);
const decoded = smartjson.parse(stringified);
expect(decoded.myBuffer.toString()).toEqual('hello');
});
tap.start();