Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrust committed Sep 13, 2024
1 parent ab4cae2 commit 73f7fdc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/decentralized-kv-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});

Expand Down

0 comments on commit 73f7fdc

Please sign in to comment.