Skip to content

Commit

Permalink
chore: unskip test case (#3093)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf authored Sep 4, 2024
1 parent 121eca3 commit 6faabd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 57 deletions.
4 changes: 4 additions & 0 deletions .changeset/big-masks-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

chore: unskip test case
59 changes: 2 additions & 57 deletions packages/account/src/providers/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FuelError, ErrorCode } from '@fuel-ts/errors';
import { expectToThrowFuelError, safeExec } from '@fuel-ts/errors/test-utils';
import { BN, bn } from '@fuel-ts/math';
import type { Receipt } from '@fuel-ts/transactions';
import { InputType, ReceiptType, TransactionType } from '@fuel-ts/transactions';
import { InputType, ReceiptType } from '@fuel-ts/transactions';
import { DateTime, arrayify, sleep } from '@fuel-ts/utils';
import { ASSET_A, ASSET_B } from '@fuel-ts/utils/test-utils';
import { versions } from '@fuel-ts/versions';
Expand Down Expand Up @@ -252,58 +252,6 @@ describe('Provider', () => {
expect(callResult.receipts).toStrictEqual(expectedReceipts);
});

// TODO: Add tests to provider sendTransaction
// sendTransaction can't be tested without a valid signature
// importing and testing it here can generate cycle dependency
// as we test this in other modules like call contract its ok to
// skip for now
it.skip('can sendTransaction()', async () => {
using launched = await setupTestProviderAndWallets();
const { provider } = launched;

const response = await provider.sendTransaction({
type: TransactionType.Script,
tip: 0,
gasLimit: 1000000,
script:
/*
Opcode::ADDI(0x10, REG_ZERO, 0xCA)
Opcode::ADDI(0x11, REG_ZERO, 0xBA)
Opcode::LOG(0x10, 0x11, REG_ZERO, REG_ZERO)
Opcode::RET(REG_ONE)
*/
arrayify('0x504000ca504400ba3341100024040000'),
scriptData: randomBytes(32),
});

const result = await response.wait();

expect(result.receipts).toEqual([
{
type: ReceiptType.Log,
id: ZeroBytes32,
val0: bn(202),
val1: bn(186),
val2: bn(0),
val3: bn(0),
pc: bn(0x2878),
is: bn(0x2870),
},
{
type: ReceiptType.Return,
id: ZeroBytes32,
val: bn(1),
pc: bn(0x287c),
is: bn(0x2870),
},
{
type: ReceiptType.ScriptResult,
result: bn(0),
gasUsed: bn(0x2c),
},
]);
});

it('can get all chain info', async () => {
using launched = await setupTestProviderAndWallets();
const { provider } = launched;
Expand Down Expand Up @@ -447,10 +395,7 @@ describe('Provider', () => {
expect(newest >= oldest).toBeTruthy();
});

// TODO: Add back support for producing blocks with intervals by supporting the new
// `block_production` config option for `fuel_core`.
// See: https://github.com/FuelLabs/fuel-core/blob/def8878b986aedad8434f2d1abf059c8cbdbb8e2/crates/services/consensus_module/poa/src/config.rs#L20
it.skip('can force-produce blocks with custom timestamps', async () => {
it('can force-produce blocks with custom timestamps', async () => {
using launched = await setupTestProviderAndWallets();
const { provider } = launched;

Expand Down

0 comments on commit 6faabd2

Please sign in to comment.