Replace chai.should with chai.expect (#1780)
* changed exxpect to expect wherever applicable * Merged with latest branch * Updated merkleTree helper to latest master branch * Made linting fixes * Fix for test build * updated for Coverage * Updated Address.test.js * Undo package-lock changes.
This commit is contained in:
committed by
Francisco Giordano
parent
852e11c2db
commit
489d2e85f1
@ -1,6 +1,8 @@
|
||||
const { BN, constants, expectEvent, expectRevert } = require('openzeppelin-test-helpers');
|
||||
const { ZERO_ADDRESS } = constants;
|
||||
|
||||
const { expect } = require('chai');
|
||||
|
||||
const { shouldBehaveLikeERC721 } = require('./ERC721.behavior');
|
||||
const ERC721Mock = artifacts.require('ERC721Mock.sol');
|
||||
|
||||
@ -31,8 +33,8 @@ contract('ERC721', function ([_, creator, tokenOwner, other, ...accounts]) {
|
||||
});
|
||||
|
||||
it('creates the token', async function () {
|
||||
(await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal('1');
|
||||
(await this.token.ownerOf(tokenId)).should.equal(tokenOwner);
|
||||
expect(await this.token.balanceOf(tokenOwner)).to.be.bignumber.equal('1');
|
||||
expect(await this.token.ownerOf(tokenId)).to.equal(tokenOwner);
|
||||
});
|
||||
|
||||
it('reverts when adding a token id that already exists', async function () {
|
||||
@ -69,7 +71,7 @@ contract('ERC721', function ([_, creator, tokenOwner, other, ...accounts]) {
|
||||
});
|
||||
|
||||
it('deletes the token', async function () {
|
||||
(await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal('0');
|
||||
expect(await this.token.balanceOf(tokenOwner)).to.be.bignumber.equal('0');
|
||||
await expectRevert(
|
||||
this.token.ownerOf(tokenId), 'ERC721: owner query for nonexistent token'
|
||||
);
|
||||
@ -107,7 +109,7 @@ contract('ERC721', function ([_, creator, tokenOwner, other, ...accounts]) {
|
||||
});
|
||||
|
||||
it('deletes the token', async function () {
|
||||
(await this.token.balanceOf(tokenOwner)).should.be.bignumber.equal('0');
|
||||
expect(await this.token.balanceOf(tokenOwner)).to.be.bignumber.equal('0');
|
||||
await expectRevert(
|
||||
this.token.ownerOf(tokenId), 'ERC721: owner query for nonexistent token'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user