chore: address review

This commit is contained in:
Vasco Santos
2020-07-15 11:40:57 +02:00
committed by Jacob Heun
parent 4ab125e017
commit 89658dd655
11 changed files with 75 additions and 61 deletions

View File

@ -25,7 +25,7 @@ class TestRecord extends Record {
return Buffer.from(this.data)
}
isEqual (other) {
equals (other) {
return Buffer.compare(this.data, other.data)
}
}
@ -74,8 +74,8 @@ describe('Envelope', () => {
const unmarshalledEnvelope = await Envelope.openAndCertify(rawEnvelope, testRecord.domain)
expect(unmarshalledEnvelope).to.exist()
const isEqual = envelope.isEqual(unmarshalledEnvelope)
expect(isEqual).to.eql(true)
const equals = envelope.equals(unmarshalledEnvelope)
expect(equals).to.eql(true)
})
it('throw on open and verify when a different domain is used', async () => {