Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: unskip test case #3093

Merged
merged 9 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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