You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: indexer/README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,8 @@ yarn graphql:generate-types
166
166
167
167
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:
168
168
169
+
You can set your graphQL endpoint in the `.env.testing` file, otherwise it defaults to `localhost:3001`.
170
+
169
171
### 6.1. Unit Tests
170
172
171
173
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
178
180
179
181
### 6.2. Integration Tests
180
182
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.
182
186
183
187
```bash
184
-
yarn test:integration
188
+
yarn test:queries
189
+
yarn test:subscriptions
185
190
```
186
191
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`.
188
193
189
194
### 6.3. Specific Integration File Test
190
195
@@ -194,8 +199,6 @@ File tests are executed using the same environment as the integration tests. To
This command will run tests using the environment variables from the `.env.testing` file.
198
-
199
202
### 6.4. Smoke Tests
200
203
201
204
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