From 73f7fdc79b83420448685f23a1f6779514fade40 Mon Sep 17 00:00:00 2001 From: syntrust Date: Fri, 13 Sep 2024 12:06:08 +0800 Subject: [PATCH] fix test --- test/decentralized-kv-test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/decentralized-kv-test.js b/test/decentralized-kv-test.js index 0c62edf..eb4846e 100644 --- a/test/decentralized-kv-test.js +++ b/test/decentralized-kv-test.js @@ -33,14 +33,16 @@ describe("DecentralizedKV Test", function () { await kv.put(key1, "0x11223344"); expect(await kv.get(key1, 0, 0, 4)).to.equal("0x11223344"); - await kv.put(key1, "0x772233445566"); + await expect(kv.put(key1, "0x772233445566")).to.be.revertedWith("DecentralizedKV: not enough batch payment"); + + await kv.put(key1, "0x772233445566", { value: 150000000000000 }); expect(await kv.get(key1, 0, 0, 4)).to.equal("0x77223344"); expect(await kv.get(key1, 0, 0, 6)).to.equal("0x772233445566"); - await kv.put(key1, "0x8899"); + await kv.put(key1, "0x8899", { value: 150000000000000 }); expect(await kv.get(key1, 0, 0, 4)).to.equal("0x8899"); - await kv.put(key1, "0x"); + await kv.put(key1, "0x", { value: 150000000000000 }); expect(await kv.get(key1, 0, 0, 4)).to.equal("0x"); });