Skip to content

Commit ccfd370

Browse files
frangionventuro
andauthored
Update Test Helpers to 0.5.6 (#2261)
* update test-helpers to 0.5.6-rc.0 * remove comment that no longer applies * fix uses of expectEvent.notEmitted * remove mocha only * update to final version * Update test/token/ERC777/ERC777.test.js Co-authored-by: Nicolás Venturo <[email protected]> Co-authored-by: Nicolás Venturo <[email protected]>
1 parent 91516b2 commit ccfd370

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

package-lock.json

Lines changed: 17 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@openzeppelin/gsn-helpers": "^0.2.3",
5151
"@openzeppelin/gsn-provider": "^0.1.10",
5252
"@openzeppelin/test-environment": "^0.1.4",
53-
"@openzeppelin/test-helpers": "^0.5.5",
53+
"@openzeppelin/test-helpers": "^0.5.6",
5454
"chai": "^4.2.0",
5555
"eslint": "^6.5.1",
5656
"eslint-config-standard": "^14.1.1",

test/access/AccessControl.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('AccessControl', function () {
4949
it('accounts can be granted a role multiple times', async function () {
5050
await this.accessControl.grantRole(ROLE, authorized, { from: admin });
5151
const receipt = await this.accessControl.grantRole(ROLE, authorized, { from: admin });
52-
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleGranted');
52+
expectEvent.notEmitted(receipt, 'RoleGranted');
5353
});
5454
});
5555

@@ -58,7 +58,7 @@ describe('AccessControl', function () {
5858
expect(await this.accessControl.hasRole(ROLE, authorized)).to.equal(false);
5959

6060
const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin });
61-
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
61+
expectEvent.notEmitted(receipt, 'RoleRevoked');
6262
});
6363

6464
context('with granted role', function () {
@@ -84,15 +84,15 @@ describe('AccessControl', function () {
8484
await this.accessControl.revokeRole(ROLE, authorized, { from: admin });
8585

8686
const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin });
87-
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
87+
expectEvent.notEmitted(receipt, 'RoleRevoked');
8888
});
8989
});
9090
});
9191

9292
describe('renouncing', function () {
9393
it('roles that are not had can be renounced', async function () {
9494
const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized });
95-
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
95+
expectEvent.notEmitted(receipt, 'RoleRevoked');
9696
});
9797

9898
context('with granted role', function () {
@@ -118,7 +118,7 @@ describe('AccessControl', function () {
118118
await this.accessControl.renounceRole(ROLE, authorized, { from: authorized });
119119

120120
const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized });
121-
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
121+
expectEvent.notEmitted(receipt, 'RoleRevoked');
122122
});
123123
});
124124
});

test/token/ERC777/ERC777.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ describe('ERC777', function () {
6060
});
6161
});
6262

63-
it.skip('does not emit AuthorizedOperator events for default operators', async function () {
64-
expectEvent.not.inConstructor(this.token, 'AuthorizedOperator'); // This helper needs to be implemented
63+
it('does not emit AuthorizedOperator events for default operators', async function () {
64+
await expectEvent.notEmitted.inConstruction(this.token, 'AuthorizedOperator');
6565
});
6666

6767
describe('basic information', function () {

0 commit comments

Comments
 (0)