Skip to content

Commit

Permalink
add running network test instructions to CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf committed Jan 9, 2025
1 parent 72dbba6 commit 1ac5f6a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,40 @@ We'd follow the same approach as explained in the [Patching old releases](#patch
- have the versions of packages on `master` match the `latest` released package versions,
- have the released functionality on `master` as well

# Network Testing

The network test suite is designed to run locally against a specified network for validation purposes.

You can find the test suite at: `packages/fuel-gauge/src/network.test.ts`.

### Setup Instructions

Before running the tests, you need to configure the `.env` file:

1. Copy the `.env.example` file:

```sh
cp .env.example .env
```

2. Set the values for the following environment variables in the `.env` file:

```env
NETWORK_TEST_URL=https://testnet.fuel.network/v1/graphql
NETWORK_TEST_PVT_KEY=0x...
```

- `NETWORK_TEST_URL`: The URL of which network the test should run (e.g., Fuel Testnet endpoint).
- `NETWORK_TEST_PVT_KEY`: Your private key for the network.

### Running the Test Suite

Once the environment is set up, run the network tests using the following command:

```sh
pnpm test:network
```

# FAQ

### Why is the prefix `fuels` and not `fuel`?
Expand Down

0 comments on commit 1ac5f6a

Please sign in to comment.