mirror of
https://github.com/logos-messaging/js-rln.git
synced 2026-01-02 13:43:06 +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 () {
|
||||
const rlnInstance = await rln.create();
|
||||
const seed = "This is a test seed";
|
||||
const memKeys = rlnInstance.generateSeededMembershipKey(seed);
|
||||
const memKeys1 = rlnInstance.generateSeededMembershipKey(seed);
|
||||
const memKeys2 = rlnInstance.generateSeededMembershipKey(seed);
|
||||
|
||||
expect(memKeys.IDCommitment).to.equal(memKeys2.IDCommitment);
|
||||
expect(memKeys.IDKey).to.equal(memKeys2.IDKey);
|
||||
memKeys1.IDCommitment.forEach((element, index) => {
|
||||
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