Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Test refactor: enable-constantinople-hardfork.js #359

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Found a assert.rejects pattern that works with v8 and v10
  • Loading branch information
ccowell committed Mar 5, 2019
commit 0d042f79abd0cea2add5a33e4e92cd0d4b324c65
12 changes: 12 additions & 0 deletions test/enable_constantinople_hardfork.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ describe("Constantinople Hardfork", function() {
context = await bootstrap(contractRef, ganacheProviderOptions);
});

it("should fail execution", async function() {
const { instance } = context;

await assert.rejects(
async() => {
await instance.methods.test(2).call();
},
/VM Exception while processing transaction: invalid opcode/,
"Call did not fail execution like it was supposed to"
);
});

it("should fail execution", async function() {
const { instance } = context;

Expand Down