Skip to content

Commit

Permalink
Fix error message in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
germartinez committed Dec 24, 2020
1 parent 9e84801 commit 06a2562
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ethLibAdapters/EthLibAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ abstract class EthLibAdapter {
}

decodeError(revertData: string): string {
if (!revertData.startsWith('0x08c379a0')) throw new Error('unrecognized error format')
if (!revertData.startsWith('0x08c379a0')) throw new Error('Unrecognized error format')

return this.abiDecode(['string'], `0x${revertData.slice(10)}`)[0]
}
Expand Down
2 changes: 1 addition & 1 deletion test/ethers/shouldWorkWithEthers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function shouldWorkWithEthers({

it('should not produce CPK instances when ethers not connected to a recognized network', async () => {
const ethLibAdapter = new EthersAdapter({ ethers, signer })
await CPK.create({ ethLibAdapter }).should.be.rejectedWith(/unrecognized network ID \d+/)
await CPK.create({ ethLibAdapter }).should.be.rejectedWith(/Unrecognized network ID \d+/)
})

describe('with valid networks configuration', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/web3/shouldWorkWithWeb3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function shouldWorkWithWeb3({

it('should not produce CPK instances when web3 not connected to a recognized network', async () => {
const ethLibAdapter = new Web3Adapter({ web3: ueb3 })
await CPK.create({ ethLibAdapter }).should.be.rejectedWith(/unrecognized network ID \d+/)
await CPK.create({ ethLibAdapter }).should.be.rejectedWith(/Unrecognized network ID \d+/)
})

describe('with valid networks configuration', () => {
Expand Down

0 comments on commit 06a2562

Please sign in to comment.