mirror of
https://github.com/logos-messaging/js-rln.git
synced 2026-05-21 01:19:29 +00:00
compare uint8arrays by each element
This commit is contained in:
parent
d41181fc92
commit
febc7e7fa5
@ -116,10 +116,14 @@ describe("js-rln", () => {
|
|||||||
it("should generate the same membership key if the same seed is provided", async function () {
|
it("should generate the same membership key if the same seed is provided", async function () {
|
||||||
const rlnInstance = await rln.create();
|
const rlnInstance = await rln.create();
|
||||||
const seed = "This is a test seed";
|
const seed = "This is a test seed";
|
||||||
const memKeys = rlnInstance.generateSeededMembershipKey(seed);
|
const memKeys1 = rlnInstance.generateSeededMembershipKey(seed);
|
||||||
const memKeys2 = rlnInstance.generateSeededMembershipKey(seed);
|
const memKeys2 = rlnInstance.generateSeededMembershipKey(seed);
|
||||||
|
|
||||||
expect(memKeys.IDCommitment).to.equal(memKeys2.IDCommitment);
|
memKeys1.IDCommitment.forEach((element, index) => {
|
||||||
expect(memKeys.IDKey).to.equal(memKeys2.IDKey);
|
expect(element).to.equal(memKeys2.IDCommitment[index]);
|
||||||
|
});
|
||||||
|
memKeys1.IDKey.forEach((element, index) => {
|
||||||
|
expect(element).to.equal(memKeys2.IDKey[index]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user