Skip to content

Commit d95106a

Browse files
committed
fix: reflect readme to current tests
1 parent 8830277 commit d95106a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

indexer/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ yarn graphql:generate-types
166166

167167
The Kadena Indexer project includes several types of tests to ensure the functionality and reliability of the codebase. Below are the instructions to run these tests:
168168

169+
You can set your graphQL endpoint in the `.env.testing` file, otherwise it defaults to `localhost:3001`.
170+
169171
### 6.1. Unit Tests
170172

171173
Unit tests are designed to test individual components or functions in isolation. To run the unit tests, use the following command:
@@ -178,13 +180,16 @@ This command will execute all the unit tests located in the `tests/unit` directo
178180

179181
### 6.2. Integration Tests
180182

181-
Integration tests are used to test the queries and subscriptions of the GraphQL API. To run the integration tests, use the following command:
183+
Integration tests are used to test the queries and subscriptions of the GraphQL API. Run the integration tests separatedly because jest cannot handle using the same client for running queries and wss:
184+
185+
**Notice:** Queries and Subscriptions rely on a running postgres database with the same schema as the indexer with the full history synched correctly. Only run this test if you intend to host your own database.
182186

183187
```bash
184-
yarn test:integration
188+
yarn test:queries
189+
yarn test:subscriptions
185190
```
186191

187-
This command will execute the integration tests located in the `tests/integration` directory, using the environment variables specified in the `.env.testing` file.
192+
This command will execute the integration tests located in the `tests/integration` directory, using the environment variables specified in `.env`.
188193

189194
### 6.3. Specific Integration File Test
190195

@@ -194,8 +199,6 @@ File tests are executed using the same environment as the integration tests. To
194199
yarn test:file tests/integration/events.query.test.ts
195200
```
196201

197-
This command will run tests using the environment variables from the `.env.testing` file.
198-
199202
### 6.4. Smoke Tests
200203

201204
Smoke tests are a subset of integration tests that verify the basic functionality of the application. To run the smoke tests, use the following command:

0 commit comments

Comments
 (0)