Skip to content

Commit

Permalink
default provider tests update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevcs committed May 24, 2024
1 parent 6ebda42 commit fb4b3af
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/web3/test/integration/web3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ describe('Web3 instance', () => {
expect(typeof web3Instance.eth.currentProvider?.disconnect).toBe('function');
});

it('should be able use "utils" without provider', () => {
it('should be able use "utils" ', () => {
web3 = new Web3();

expect(web3.utils.hexToNumber('0x5')).toBe(5);
});

it('should be able use "abi" without provider', () => {
it('should be able use "abi" ', () => {
web3 = new Web3();
const validData = validEncodeParametersData[0];

Expand All @@ -141,12 +141,6 @@ describe('Web3 instance', () => {
expect(encodedParameters).toEqual(validData.output);
});

it('should throw error when we make a request when provider not available', async () => {
web3 = new Web3("");

await expect(web3.eth.getChainId()).rejects.toThrow('Provider not available');
});

describeIf(isHttp)('Create Web3 class instance with http string providers', () => {
it('should create instance with string provider', () => {
web3 = new Web3(provider);
Expand Down

0 comments on commit fb4b3af

Please sign in to comment.