Skip to content

Commit

Permalink
fix: Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Apr 24, 2024
1 parent 8a2616a commit dd12b35
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/tests/ports/transaction/checkGasPrice.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit dd12b35

Please sign in to comment.