From 06a25628b72d175ce10cfcbee745ead0cd0766c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 24 Dec 2020 15:58:49 +0100 Subject: [PATCH] Fix error message in tests --- src/ethLibAdapters/EthLibAdapter.ts | 2 +- test/ethers/shouldWorkWithEthers.ts | 2 +- test/web3/shouldWorkWithWeb3.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ethLibAdapters/EthLibAdapter.ts b/src/ethLibAdapters/EthLibAdapter.ts index e884c627..880c9305 100644 --- a/src/ethLibAdapters/EthLibAdapter.ts +++ b/src/ethLibAdapters/EthLibAdapter.ts @@ -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] } diff --git a/test/ethers/shouldWorkWithEthers.ts b/test/ethers/shouldWorkWithEthers.ts index 876e65ef..41f94ece 100644 --- a/test/ethers/shouldWorkWithEthers.ts +++ b/test/ethers/shouldWorkWithEthers.ts @@ -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', () => { diff --git a/test/web3/shouldWorkWithWeb3.ts b/test/web3/shouldWorkWithWeb3.ts index 455b23f7..a4bb8141 100644 --- a/test/web3/shouldWorkWithWeb3.ts +++ b/test/web3/shouldWorkWithWeb3.ts @@ -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', () => {