From 925517ac2c6000b32a7cd063ff6674802160c8d7 Mon Sep 17 00:00:00 2001 From: Pascal Perrenoud Date: Tue, 14 May 2024 15:24:33 +0200 Subject: [PATCH] test - asym box : Check toStr and fromStr are equal --- test/boxes/asymmetric.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/boxes/asymmetric.test.ts b/test/boxes/asymmetric.test.ts index 71b6bb0..6124cb8 100644 --- a/test/boxes/asymmetric.test.ts +++ b/test/boxes/asymmetric.test.ts @@ -32,6 +32,7 @@ test('toString and fromString are inverses', async () => { const box = (await asymmetric.PrivateBox.encrypt(pub, data)).expect("Should encrypt the data") const str = box.toString() const box2 = asymmetric.PrivateBox.fromString(str).expect("Should parse the string") + expect(box).toEqual(box2) const plain = (await box2.decrypt(priv)).expect("Should decrypt the data") expect(plain).toEqual(data)