Skip to content

Commit 4d24fa5

Browse files
committed
simplify ERC20 return value tests
1 parent 43e8669 commit 4d24fa5

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

spec/token/ERC20/ERC20Base.behavior.ts

+5-12
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ export function describeBehaviorOfERC20Base(
141141

142142
describe('#transfer(address,uint256)', function () {
143143
it('returns true', async () => {
144-
const amount = ethers.constants.Two;
145-
await mint(holder.address, amount);
146-
147144
expect(
148145
await instance
149146
.connect(holder)
150-
.callStatic['transfer(address,uint256)'](receiver.address, amount),
147+
.callStatic['transfer(address,uint256)'](
148+
receiver.address,
149+
ethers.constants.Zero,
150+
),
151151
).to.be.true;
152152
});
153153

@@ -181,20 +181,13 @@ export function describeBehaviorOfERC20Base(
181181

182182
describe('#transferFrom(address,address,uint256)', function () {
183183
it('returns true', async () => {
184-
const amount = ethers.constants.Two;
185-
await mint(holder.address, amount);
186-
187-
await instance
188-
.connect(holder)
189-
['approve(address,uint256)'](spender.address, amount);
190-
191184
expect(
192185
await instance
193186
.connect(spender)
194187
.callStatic['transferFrom(address,address,uint256)'](
195188
holder.address,
196189
receiver.address,
197-
amount,
190+
ethers.constants.Zero,
198191
),
199192
).to.be.true;
200193
});

0 commit comments

Comments
 (0)