Skip to content

Commit

Permalink
params is no 0x ,should failed增加同样的错误信息断言
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchengzhu authored and gpBlockchain committed Aug 30, 2023
1 parent 694b007 commit 4951d97
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/rpc/web3_sha3.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ describe("web3_sha3", function () {
expect('').to.be.equal('failed')
})
it(' params is no 0x ,should failed ', async () => {
//todo check eth return failed
let response = await ethers.provider.send('web3_sha3', ["68656c6c6f20776f726c64"])
expect(response).to.be.equal('0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad')
try {
await ethers.provider.send('web3_sha3', ["68656c6c6f20776f726c64"])
} catch (error) {
expect(error.message).to.include('invalid prefix');
}
})
})
})

0 comments on commit 4951d97

Please sign in to comment.