From faded286aeb91cb83e27a07bb820127543a54676 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 26 Oct 2023 12:02:21 +0000 Subject: [PATCH] serialization test --- .../types/src/notes/note_spending_info_dao.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 yarn-project/types/src/notes/note_spending_info_dao.test.ts diff --git a/yarn-project/types/src/notes/note_spending_info_dao.test.ts b/yarn-project/types/src/notes/note_spending_info_dao.test.ts new file mode 100644 index 000000000000..deb07f9fc77a --- /dev/null +++ b/yarn-project/types/src/notes/note_spending_info_dao.test.ts @@ -0,0 +1,10 @@ +import { randomNoteSpendingInfoDao } from '../mocks.js'; +import { NoteSpendingInfoDao } from './note_spending_info_dao.js'; + +describe('note_spending_info', () => { + it('convert to and from buffer', () => { + const noteSpendingInfoDao = randomNoteSpendingInfoDao(); + const buf = noteSpendingInfoDao.toBuffer(); + expect(NoteSpendingInfoDao.fromBuffer(buf)).toEqual(noteSpendingInfoDao); + }); +});