Skip to content

Commit 888d3df

Browse files
committed
Add regression test for issue #863
1 parent f1482cd commit 888d3df

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/integration/standard.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ describe('Hardhat Plugin: standard use cases', function() {
424424
file: mock.pathToContract(hardhatConfig, 'ModifiersC.sol'),
425425
pct: 25
426426
},
427+
{
428+
file: mock.pathToContract(hardhatConfig, 'ModifiersD.sol'),
429+
pct: 100
430+
},
431+
427432
];
428433

429434
verify.branchCoverage(expected);

test/sources/projects/modifiers/test/modifiers.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
const ModifiersA = artifacts.require("ModifiersA");
22
const ModifiersC = artifacts.require("ModifiersC");
3+
const ModifiersD = artifacts.require("ModifiersD");
34

45
contract("Modifiers", function(accounts) {
56
let instance;
67

78
before(async () => {
89
A = await ModifiersA.new();
910
C = await ModifiersC.new();
11+
D = await ModifiersD.new();
1012
})
1113

1214
it('simpleSet (overridden method)', async function(){
@@ -37,4 +39,14 @@ contract("Modifiers", function(accounts) {
3739
/* ignore */
3840
}
3941
});
42+
43+
it('when false & true branches are hit in immediate succesion by EOA (issue #863)', async function(){
44+
try {
45+
await D.a({from: accounts[1]});
46+
} catch (e) {
47+
/* ignore */
48+
}
49+
50+
await D.a({from: accounts[0]});
51+
})
4052
});

0 commit comments

Comments
 (0)