From dd12b353cecd70395dfab3e5efbb1906c6515992 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Wed, 24 Apr 2024 14:54:08 -0300 Subject: [PATCH] fix: Tests --- .../ports/transaction/checkGasPrice.spec.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/tests/ports/transaction/checkGasPrice.spec.ts b/test/tests/ports/transaction/checkGasPrice.spec.ts index be20e15..8756d97 100644 --- a/test/tests/ports/transaction/checkGasPrice.spec.ts +++ b/test/tests/ports/transaction/checkGasPrice.spec.ts @@ -100,6 +100,26 @@ test('checkGasPrice component', function ({ components }) { }) describe('and the txn contract method is allowed to skip max gas price', () => { + beforeEach(() => { + const { features, fetcher } = components + jest.spyOn(features, 'getFeatureVariant').mockResolvedValueOnce({ + name: 'max-gas-price-allowed-in-wei', + payload: { + type: 'string', + value: '2000000000', + }, + enabled: true, + }) + jest.spyOn(fetcher, 'fetch').mockResolvedValueOnce({ + ok: true, + json: jest.fn().mockResolvedValueOnce({ + gasPrice: { + unit: 'gwei', + value: 1, + }, + }), + } as unknown as Response) + }) describe('and the txn is an approve of the collection manager to spend mana on behalf of the user', () => { it('should not throw an error', async () => { await expect(