mardi 9 juin 2020

Test error using chai. It passes expect but fails actual

I am trying to check a function of a smart contract using chai and I get the following errorenter image description here.

Why is that happening?

The testing code is:

expect(await this.dataRestrictions.getUsersIAllowToQueryMe()).to.have.members([this.acc2_id, this.acc3_id, this.acc4_id]);

It also failed

expect(await this.dataRestrictions.getUsersIAllowToQueryMe()).to.have.members([this.acc2_id, this.acc3_id, this.acc4_id]);

With a similar error code

getUsersIAllowToQueryMe: returns an array of BN

this.acc*_id is a big number.

Why does it not pass both expect and actual?

Aucun commentaire:

Enregistrer un commentaire